Permalink
Browse files

[WIN32] fixed: setup file name got the branch name back (2. try)

  • Loading branch information...
1 parent d9f8b89 commit fe87e5089e8852445cc8a2461d0106acac96c97e wsoltys committed Apr 16, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 project/Win32BuildSetup/BuildSetup.bat
@@ -59,7 +59,13 @@ IF %comp%==vs2010 (
set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /clean "%buildconfig%"
set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe"
set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb"
- for /f "tokens=* delims= " %%a in ('git rev-parse --abbrev-ref HEAD') do set BRANCH=%%a
+
+ :: when building with jenkins there's no branch. First git command gets the branch even there
+ :: but is empty in a normal build environment. Second git command gets the branch there.
+ for /f "tokens=3 delims=/" %%a in ('git branch -r --contains HEAD') do set BRANCH=%%a
+ IF %BRANCH%==na (
+ for /f "tokens=* delims= " %%a in ('git rev-parse --abbrev-ref HEAD') do set BRANCH=%%a
+ )
rem CONFIG END
rem -------------------------------------------------------------

0 comments on commit fe87e50

Please sign in to comment.