We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25a8c2c commit ada429bCopy full SHA for ada429b
windows/makefile
@@ -19,13 +19,13 @@ VERSION = $(GITHUB_REF_NAME)
19
!ENDIF
20
21
# Git commit hash (unique identifier for build)
22
-!IF [cmd /c "git rev-parse --short HEAD > .hash.tmp 2>nul && (echo COMMIT_HASH = & type .hash.tmp) > .commit.tmp 2>nul"] == 0
23
-!INCLUDE .commit.tmp
+!IF [powershell -NoProfile -Command "$hash = git rev-parse --short HEAD 2>$null; if ($hash) { Set-Content -Path .hash.tmp -Value \"COMMIT_HASH = $hash\" -NoNewline; exit 0 } else { exit 1 }"] == 0
+!INCLUDE .hash.tmp
24
!ELSE
25
COMMIT_HASH = unknown
26
27
-# Clean up temp files
28
-!IF [del .hash.tmp .commit.tmp 2>nul]
+# Clean up temp file
+!IF [del .hash.tmp 2>nul]
29
30
31
APP_NAME_VERSION = $(APP_NAME) $(VERSION)
0 commit comments