commit 5f0ba6b8a9444cfb00b63591ed3b3d81f9064a53
Author: Jan RÄ™korajski <[email protected]>
Date:   Mon Sep 24 22:53:12 2012 +0200

    - fix finding last tag for head kernel

 client/rebuild-th-kernel.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/client/rebuild-th-kernel.sh b/client/rebuild-th-kernel.sh
index 303ec58..7d839cf 100755
--- a/client/rebuild-th-kernel.sh
+++ b/client/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/projects/pld-builder.new.git/commitdiff/5f0ba6b8a9444cfb00b63591ed3b3d81f9064a53

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to