WebTools-NG/script/getGitVer.sh
2020-10-17 00:40:27 +02:00

8 lines
No EOL
303 B
Bash
Executable file

# Export rev to env, for the artifact
export AppRev=$(git rev-parse --short HEAD)
# Get git root directory
root=$(git rev-parse --show-toplevel 2>&1)
# get commit hash for version file
rev='{"rev":"'$(git rev-parse --short HEAD 2>&1)'"}'
# Save to version file
echo "$rev" > "$root/public/version.json"