mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
build: use lightweight tags too as version
As autogenerated by github releases
This commit is contained in:
parent
265391ca03
commit
bad14dc89d
@ -2,12 +2,12 @@
|
||||
|
||||
# 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
|
||||
then
|
||||
VERSION="unknown"
|
||||
else
|
||||
VERSION=$(git describe --always 2>&1 | tr : _ )
|
||||
VERSION=$(git describe --tags --always 2>&1 | tr : _ )
|
||||
fi
|
||||
|
||||
# ignore git stderr "fatal:
|
||||
|
@ -16,9 +16,9 @@ if not "%VERSION%"=="" set VERSION=!VERSION:^:=_!
|
||||
cd /d "%~dp0"
|
||||
|
||||
|
||||
REM try get version from Git (dynamic)
|
||||
REM try get version from Git (dynamic), including lightweight tags
|
||||
: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 "%VERSION%"=="" goto :get_version_h
|
||||
if %VERSION%==%VERSION_DEFAULT% goto :get_version_h
|
||||
|
@ -6,11 +6,11 @@ VERSION_NAME=VGMSTREAM_VERSION
|
||||
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
|
||||
VERSION=""
|
||||
else
|
||||
VERSION=$(git describe --always 2>&1 | tr : _ )
|
||||
VERSION=$(git describe --tags --always 2>&1 | tr : _ )
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user