Explicitly set version hash to use 7 characters

While 7 is the default number of characters used to abbreviate a commit hash,
this is not (by default) constant and different instances of the same repo may
generate different version strings as a result. This commit sets this length
explicitly to 7 in both package.sh and build-image scripts.
This commit is contained in:
2024-04-11 11:43:26 -07:00
parent 4a89356390
commit e35fc56163
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ if [ -z $VERSION_NAME ];then
VERSION_NAME="$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
# if not ci, try to use git
elif command -v git &> /dev/null; then
VERSION_NAME=$(git describe --always --tags --dirty)
VERSION_NAME=$(git describe --always --tags --abbrev=7 --dirty)
# fallback
else
VERSION_NAME="latest"