Merge pull request #918 from bnnm/tags

tags
This commit is contained in:
bnnm 2021-08-15 16:33:49 +02:00 committed by GitHub
commit f6f26c7992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -2,12 +2,12 @@
# echo current git version (doesn't make version_auto.h) # echo current git version (doesn't make version_auto.h)
# test if git exists # try get version from Git (dynamic), including lightweight tags
if ! command -v git > /dev/null if ! command -v git > /dev/null
then then
VERSION="unknown" VERSION="unknown"
else else
VERSION=$(git describe --always 2>&1 | tr : _ ) VERSION=$(git describe --tags --always 2>&1 | tr : _ )
fi fi
# ignore git stderr "fatal: # ignore git stderr "fatal:

View File

@ -16,9 +16,9 @@ if not "%VERSION%"=="" set VERSION=!VERSION:^:=_!
cd /d "%~dp0" cd /d "%~dp0"
REM try get version from Git (dynamic) REM try get version from Git (dynamic), including lightweight tags
:get_version_git :get_version_git
for /f %%v in ('git describe --always') do set VERSION=%%v for /f %%v in ('git describe --tags --always') do set VERSION=%%v
if not "%VERSION%"=="" set VERSION=!VERSION:^:=_! if not "%VERSION%"=="" set VERSION=!VERSION:^:=_!
if "%VERSION%"=="" goto :get_version_h if "%VERSION%"=="" goto :get_version_h
if %VERSION%==%VERSION_DEFAULT% goto :get_version_h if %VERSION%==%VERSION_DEFAULT% goto :get_version_h

View File

@ -6,11 +6,11 @@ VERSION_NAME=VGMSTREAM_VERSION
VERSION_FILE=version_auto.h VERSION_FILE=version_auto.h
# try get version from Git (dynamic) # try get version from Git (dynamic), including lightweight tags
if ! command -v git > /dev/null ; then if ! command -v git > /dev/null ; then
VERSION="" VERSION=""
else else
VERSION=$(git describe --always 2>&1 | tr : _ ) VERSION=$(git describe --tags --always 2>&1 | tr : _ )
fi fi