Skip to content

Commit 0cf8956

Browse files
committed
use a unified commit hash length when building in different platform
1 parent 8b06731 commit 0cf8956

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ goto :pre_parse_args
112112
set VERSION=%VERSION: =%
113113
set VERSION=%VERSION:,=%
114114
set VERSION=%VERSION:"=%
115-
for /f %%x in ('git rev-parse --short HEAD') do set "COMMIT_HASH=%%x"
115+
for /f %%x in ('git rev-parse --short^=7 HEAD') do set "COMMIT_HASH=%%x"
116116
call :set_unixtime BUILD_UNIXTIME
117117
call :set_date BUILD_DATE
118118

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ check_type_dependencies() {
117117

118118
set_build_parameters() {
119119
VERSION="$(grep '"version": ' package.json | awk -F ':' '{print $2}' | tr -d ' ' | tr -d ',' | tr -d '"')"
120-
COMMIT_HASH="$(git rev-parse --short HEAD)"
120+
COMMIT_HASH="$(git rev-parse --short=7 HEAD)"
121121
BUILD_UNIXTIME="$(date '+%s')"
122122
}
123123

0 commit comments

Comments
 (0)