From 5992c5ceb28087314df3f99f2da68e7869b9ef28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Wed, 10 Apr 2019 10:43:21 +0200 Subject: [PATCH 1/2] build: Use annotated tags --- libuuu/gen_ver.sh | 2 +- msvc/createversion.bat | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libuuu/gen_ver.sh b/libuuu/gen_ver.sh index 4c6f9ce3..228ff2a8 100755 --- a/libuuu/gen_ver.sh +++ b/libuuu/gen_ver.sh @@ -7,7 +7,7 @@ if [ "${APPVEYOR_BUILD_VERSION}" = "" ]; then echo build not in appveyor else - git tag uuu_${APPVEYOR_BUILD_VERSION} + git tag -m"uuu ${APPVEYOR_BUILD_VERSION}" uuu_${APPVEYOR_BUILD_VERSION} fi # Test if we are in a repo diff --git a/msvc/createversion.bat b/msvc/createversion.bat index 0e095737..47f10ae0 100644 --- a/msvc/createversion.bat +++ b/msvc/createversion.bat @@ -7,10 +7,10 @@ IF ERRORLEVEL 1 ( IF "%APPVEYOR_BUILD_VERSION%" == "" ( echo build not from appveryor ) ELSE ( - git tag uuu_%APPVEYOR_BUILD_VERSION% + git tag -m "uuu %APPVEYOR_BUILD_VERSION%" uuu_%APPVEYOR_BUILD_VERSION% ) FOR /F "tokens=*" %%a in ('call git describe --tags --long') do ( echo #define GIT_VERSION "lib%%a" > %1/gitversion.h ) -) \ No newline at end of file +) From 15777d04e75262b06d6a63d907b1b961153ab5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Wed, 10 Apr 2019 10:44:18 +0200 Subject: [PATCH 2/2] build: Drop '--tags' This is not needed when using annotated tags. --- libuuu/gen_ver.sh | 2 +- msvc/createversion.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libuuu/gen_ver.sh b/libuuu/gen_ver.sh index 228ff2a8..02eb0bc1 100755 --- a/libuuu/gen_ver.sh +++ b/libuuu/gen_ver.sh @@ -15,6 +15,6 @@ if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then #echo "In a repo" # Get the version of the last commit of the repo - version=`git describe --tags --long` + version=`git describe --long` echo "#define GIT_VERSION \"lib$version\"" > $file_to_write fi diff --git a/msvc/createversion.bat b/msvc/createversion.bat index 47f10ae0..b5cd5d91 100644 --- a/msvc/createversion.bat +++ b/msvc/createversion.bat @@ -10,7 +10,7 @@ IF ERRORLEVEL 1 ( git tag -m "uuu %APPVEYOR_BUILD_VERSION%" uuu_%APPVEYOR_BUILD_VERSION% ) - FOR /F "tokens=*" %%a in ('call git describe --tags --long') do ( + FOR /F "tokens=*" %%a in ('call git describe --long') do ( echo #define GIT_VERSION "lib%%a" > %1/gitversion.h ) )