Skip to content
Snippets Groups Projects
Commit 3a08ced3 authored by svornost's avatar svornost
Browse files

If git rev-parse returns an error, set the commit hash to null

parent 1b980102
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,8 @@ for %%k in (HKCU HKLM) do (
if %GITFOUND% == yes (
set "PATH=%GIT%bin;%PATH%"
echo|set /p out="App.Version.commitHash = " > "%~dp0src\002-config\fc-version.js.commitHash.js"
git rev-parse --sq --short HEAD >> "%~dp0src\002-config\fc-version.js.commitHash.js"
git rev-parse --sq --short HEAD >> "%~dp0src\002-config\fc-version.js.commitHash.js" 2>NUL
if errorlevel 1 echo|set /p out="null" >> "%~dp0src\002-config\fc-version.js.commitHash.js"
echo|set /p out=";" >> "%~dp0src\002-config\fc-version.js.commitHash.js"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment