From fe87e5089e8852445cc8a2461d0106acac96c97e Mon Sep 17 00:00:00 2001 From: wsoltys Date: Tue, 16 Apr 2013 21:29:57 +0200 Subject: [WIN32] fixed: setup file name got the branch name back (2. try) --- project/Win32BuildSetup/BuildSetup.bat | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'project') diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat index 8cf969c28e..1edb73b714 100644 --- a/project/Win32BuildSetup/BuildSetup.bat +++ b/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 ------------------------------------------------------------- -- cgit v1.2.3