use a unified commit hash length when building in different platform

This commit is contained in:
MaysWind
2025-07-13 21:51:14 +08:00
parent 8b06731cdb
commit 0cf89562cd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ goto :pre_parse_args
set VERSION=%VERSION: =%
set VERSION=%VERSION:,=%
set VERSION=%VERSION:"=%
for /f %%x in ('git rev-parse --short HEAD') do set "COMMIT_HASH=%%x"
for /f %%x in ('git rev-parse --short^=7 HEAD') do set "COMMIT_HASH=%%x"
call :set_unixtime BUILD_UNIXTIME
call :set_date BUILD_DATE
+1 -1
View File
@@ -117,7 +117,7 @@ check_type_dependencies() {
set_build_parameters() {
VERSION="$(grep '"version": ' package.json | awk -F ':' '{print $2}' | tr -d ' ' | tr -d ',' | tr -d '"')"
COMMIT_HASH="$(git rev-parse --short HEAD)"
COMMIT_HASH="$(git rev-parse --short=7 HEAD)"
BUILD_UNIXTIME="$(date '+%s')"
}