commit bc058eca5f107371c43a169e5b82c0134a0dc42a
Author: Jan RÄ™korajski <[email protected]>
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

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

Reply via email to