aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalP <CrystalP@xbmc.org>2012-01-02 13:51:18 -0500
committerCrystalP <CrystalP@xbmc.org>2012-01-02 13:51:18 -0500
commit082694e2c84e8126bdddfabea66f0a70629616b7 (patch)
treebb6e57d49d83160a4f8a67e3e7812b7ccd8ab241
parente15f731f715a873ddd8673843ec1e3c8ea0e6a19 (diff)
[WIN] fix extraction to return unknown version in case the git tool doesn't return any line
-rw-r--r--project/Win32BuildSetup/extract_git_rev.bat9
1 files changed, 3 insertions, 6 deletions
diff --git a/project/Win32BuildSetup/extract_git_rev.bat b/project/Win32BuildSetup/extract_git_rev.bat
index 880ce620b6..242c09aa41 100644
--- a/project/Win32BuildSetup/extract_git_rev.bat
+++ b/project/Win32BuildSetup/extract_git_rev.bat
@@ -2,6 +2,8 @@
REM Batch file output: %GIT_REV% variable, containing the git revision
+SET GIT_REV=unknown
+
REM Use tgit.exe of TortoiseGit if available
SET GITEXE=tgit.exe
%GITEXE% --version > NUL 2>&1
@@ -21,14 +23,9 @@ GOTO :extract
REM Fallback on wrapped msysgit - must be in the path
SET GITEXE=git.cmd
CALL %GITEXE% --help > NUL 2>&1
-IF errorlevel 1 GOTO :nogit
+IF errorlevel 1 GOTO :done
GOTO :extract
-:nogit
-
-REM Failure - no git tool to extract information.
-SET GIT_REV=Unknown
-GOTO :done
:extract