Skip to content
Snippets Groups Projects
Commit c435f06b authored by Ralph Giles's avatar Ralph Giles
Browse files

Pass --always to git describe.

This generates a useful version string even for --depth=1 checkouts.
The option was added in git v1.6.6.
parent a32fa319
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,8 @@ fi ...@@ -34,7 +34,8 @@ fi
# -dirty from files that have been touched but are not actually altered in the # -dirty from files that have been touched but are not actually altered in the
# working dir. # working dir.
GIT_VERSION=$(cd "$SRCDIR" && git status > /dev/null 2>&1 \ GIT_VERSION=$(cd "$SRCDIR" && git status > /dev/null 2>&1 \
&& git describe --tags --match 'v*' --dirty 2> /dev/null) && git describe --tags --match 'v*' \
--always --dirty 2> /dev/null)
GIT_VERSION=${GIT_VERSION#v} GIT_VERSION=${GIT_VERSION#v}
if [ -n "$GIT_VERSION" ]; then if [ -n "$GIT_VERSION" ]; then
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
setlocal enableextensions enabledelayedexpansion setlocal enableextensions enabledelayedexpansion
for /f %%v in ('git --git-dir="%~dp0..\.git" describe --tags --match "v*"') do set version=%%v for /f %%v in ('git --git-dir="%~dp0..\.git" describe --tags --match "v*" --always --dirty') do set version=%%v
if not "%version%"=="" goto :gotversion if not "%version%"=="" goto :gotversion
...@@ -43,4 +43,4 @@ copy /y "%1_temp" "%1" ...@@ -43,4 +43,4 @@ copy /y "%1_temp" "%1"
:exit :exit
del "%1_temp" del "%1_temp"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment