summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2023-08-30 16:36:29 +0200
committerVladimír Čunát <vladimir.cunat@nic.cz>2023-08-30 16:36:29 +0200
commit735497670fabf10105e06995cda3382ccae67908 (patch)
tree0092eb7404503619fdda5cdf7af27c6f4bca49ce
parentBump version to 6.0.2 (diff)
downloadknot-resolver-735497670fabf10105e06995cda3382ccae67908.tar.xz
knot-resolver-735497670fabf10105e06995cda3382ccae67908.zip
scripts/make-archive.sh: more precise tag detection
This works better in the current case when master branch with the most recent 5.7.0 tag got merged into the 6.0 branch. In that case we do not want the most recent *generally* reachable tag, and git-describe has probably good logic for this (using first-parent jumps I guess).
-rwxr-xr-xscripts/make-archive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/make-archive.sh b/scripts/make-archive.sh
index b2962289..9f2be0ea 100755
--- a/scripts/make-archive.sh
+++ b/scripts/make-archive.sh
@@ -11,7 +11,7 @@ cd "$(dirname ${0})/.."
if ! git describe --tags --exact-match; then
# devel version
- VERSION_TAG=$(git tag --merged HEAD --sort=-taggerdate | head -1)
+ VERSION_TAG=$(git describe --tags | cut -d- -f1)
VERSION=${VERSION_TAG#v}
GIT_HASH=$(git rev-parse --short=6 HEAD)
N_COMMITS=$(git rev-list $VERSION_TAG.. --count)