mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-18 19:50:46 +00:00
Third time's the charm -- fix "-plus" notation for Windows
This commit is contained in:
parent
ef26ab5e46
commit
20495e4475
@ -10,12 +10,15 @@ for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set GIT_BRANCH=%%i
|
|||||||
if "%GIT_BRANCH%"=="HEAD" set GIT_BRANCH=""
|
if "%GIT_BRANCH%"=="HEAD" set GIT_BRANCH=""
|
||||||
for /f %%i in ('git rev-parse --short HEAD') do set GIT_REVISION=%%i
|
for /f %%i in ('git rev-parse --short HEAD') do set GIT_REVISION=%%i
|
||||||
git diff-index --quiet HEAD --
|
git diff-index --quiet HEAD --
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
set GIT_INDEX=%errorlevel%
|
||||||
set GIT_REVISION=%GIT_REVISION%-plus
|
|
||||||
set GIT_TAG=
|
|
||||||
goto GitDone
|
|
||||||
)
|
|
||||||
|
|
||||||
|
if "%GIT_INDEX%"=="0" goto GitTag
|
||||||
|
|
||||||
|
set GIT_REVISION=%GIT_REVISION%-plus
|
||||||
|
set GIT_TAG=
|
||||||
|
goto GitDone
|
||||||
|
|
||||||
|
:GitTag
|
||||||
for /f %%i in ('git describe --exact-match --tags') do set GIT_TAG=%%i
|
for /f %%i in ('git describe --exact-match --tags') do set GIT_TAG=%%i
|
||||||
|
|
||||||
:GitDone
|
:GitDone
|
||||||
|
Loading…
Reference in New Issue
Block a user