diff options
author | wsoltys <wiso@no.way> | 2013-04-16 21:29:57 +0200 |
---|---|---|
committer | wsoltys <wiso@no.way> | 2013-04-16 21:30:27 +0200 |
commit | fe87e5089e8852445cc8a2461d0106acac96c97e (patch) | |
tree | 0500c82dbc1e1060ad0c61eb21b33b2ec53a8ae4 /project | |
parent | d9f8b8945cafe05ceb00a7cab90dec742a4c3fdb (diff) |
[WIN32] fixed: setup file name got the branch name back (2. try)
Diffstat (limited to 'project')
-rw-r--r-- | project/Win32BuildSetup/BuildSetup.bat | 8 |
1 files changed, 7 insertions, 1 deletions
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 ------------------------------------------------------------- |