[packages/rpm-build-tools/merge-pld-builder-client: 2303/2675] - fix finding last tag for head kernel

glen glen at pld-linux.org
Mon Dec 19 22:04:27 CET 2016


commit bc058eca5f107371c43a169e5b82c0134a0dc42a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Sep 24 22:53:12 2012 +0200

    - fix finding last tag for head kernel

 rebuild-th-kernel.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/rebuild-th-kernel.sh b/rebuild-th-kernel.sh
index 303ec58..7d839cf 100755
--- a/rebuild-th-kernel.sh
+++ b/rebuild-th-kernel.sh
@@ -28,7 +28,7 @@ pkgs_longterm=
 # autotag from rpm-build-macros
 # displays latest used tag for a specfile
 autotag() {
-	local out spec pkg
+	local out spec pkg ref
 	for spec in "$@"; do
 		# strip branches
 		pkg=${spec%:*}
@@ -40,7 +40,12 @@ autotag() {
 		pkg=${pkg%%.spec}
 		cd $pkg
 		git fetch --tags
-		out=$(git for-each-ref refs/tags/auto/${dist}/${pkg}-${alt_kernel}* --sort=-authordate --format='%(refname:short)' --count=1)
+		if [ -n "$alt_kernel" ]; then
+			ref="refs/tags/auto/${dist}/${pkg}-${alt_kernel}-[0-9]*"
+		else
+			ref="refs/tags/auto/${dist}/${pkg}-[0-9]*"
+		fi
+		out=$(git for-each-ref $ref --sort=-authordate --format='%(refname:short)' --count=1)
 		echo "$spec:$out"
 		cd - >/dev/null
 	done
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd



More information about the pld-cvs-commit mailing list