We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b47466 commit 25a8c2cCopy full SHA for 25a8c2c
windows/makefile
@@ -19,13 +19,13 @@ VERSION = $(GITHUB_REF_NAME)
19
!ENDIF
20
21
# Git commit hash (unique identifier for build)
22
-!IF [for /f "delims=" %i in ('git rev-parse --short HEAD 2^>nul') do @echo COMMIT_HASH = %i > .hash.tmp 2^>nul] == 0
23
-!INCLUDE .hash.tmp
+!IF [cmd /c "git rev-parse --short HEAD > .hash.tmp 2>nul && (echo COMMIT_HASH = & type .hash.tmp) > .commit.tmp 2>nul"] == 0
+!INCLUDE .commit.tmp
24
!ELSE
25
COMMIT_HASH = unknown
26
27
-# Clean up temp file
28
-!IF [del .hash.tmp 2>nul]
+# Clean up temp files
+!IF [del .hash.tmp .commit.tmp 2>nul]
29
30
31
APP_NAME_VERSION = $(APP_NAME) $(VERSION)
0 commit comments