Changed the display format of the Git commit hash in the version display

This commit is contained in:
Takeshi Nakatani
2024-06-23 05:43:07 +00:00
committed by Andrew Gaul
parent fa807a56fb
commit a3a0ae523f
4 changed files with 25 additions and 10 deletions

View File

@ -21,11 +21,15 @@
echo "--- Make commit hash file -------"
SHORTHASH="unknown"
SHORTHASH=""
if command -v git > /dev/null 2>&1 && test -d .git; then
if RESULT=$(git rev-parse --short HEAD); then
SHORTHASH="${RESULT}"
fi
if SHORTHASH=$(git rev-parse --short HEAD); then
echo " -> Git commit hash : ${SHORTHASH}"
else
echo " -> Not get git commit hash"
fi
else
echo " -> Not found git command or .git directory"
fi
echo "${SHORTHASH}" > default_commit_hash