From 1030f5b44e5804b5bc9a46b6098172fce2008285 Mon Sep 17 00:00:00 2001 From: philsmd Date: Tue, 24 Oct 2017 13:34:01 +0200 Subject: [PATCH] fixes #1403: fixed extraction of the version number for archives without .git dir --- docs/changes.txt | 1 + src/Makefile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index f7d5a4113..cf588898a 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -46,6 +46,7 @@ - Fixed the parsing of descrypt hashes if the hashes do have non-standard characters within the salt - Fixed the use of --veracrypt-pim option. It was completely ignored without showing an error - Fixed the version number used in the restore file header +- Fixed the version number extraction for github releases which do not including the .git directory ## ## Improvements diff --git a/src/Makefile b/src/Makefile index 9193180bc..68731b383 100644 --- a/src/Makefile +++ b/src/Makefile @@ -122,8 +122,12 @@ WIN_ICONV_64 := /opt/win-iconv-64 COMPTIME := $(shell date +%s) +# the following variable value will be automatically replaced by the "git archive" command +# (which is automatically run for every github release) +# the value will be something like this: "tag: vX.Y.Z, refs/pull/Y/head" + VERSION_EXPORT := $Format:%D$ -#VERSION_TAG := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)"|cut -d, -f2|$(SED) -r 's|.* (\w+/)?([^ ]+)|\2|') +#VERSION_TAG := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)" | $(SED) 's/.*: v\([\.0-9]*\),.*/v\1/') VERSION_TAG := 4.0.0-rc6 ##