]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts/make-archive.sh: more precise tag detection docs-develop-upda-signxn/deployments/2658
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 30 Aug 2023 14:36:29 +0000 (16:36 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 30 Aug 2023 14:36:29 +0000 (16:36 +0200)
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).

scripts/make-archive.sh

index b2962289687fd664c6a3605763edd91d0066ea46..9f2be0ea7001941b0267f0a4c9936e4c229eb262 100755 (executable)
@@ -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)