Files
garrytan--gstack/scripts/write-version-files.sh
T
wehub-resource-sync dfb0b33892
Workflow Lint / actionlint (push) Waiting to run
Build CI Image / build (push) Waiting to run
Skill Docs Freshness / check-freshness (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 11:59:46 +08:00

14 lines
229 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if git_head="$(git rev-parse HEAD 2>/dev/null)"; then
:
else
git_head=""
fi
for version_file in "$@"; do
mkdir -p "$(dirname "$version_file")"
printf '%s\n' "$git_head" > "$version_file"
done