]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
- fix finding last tag for head kernel
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 24 Sep 2012 20:53:12 +0000 (22:53 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 24 Sep 2012 20:53:12 +0000 (22:53 +0200)
client/rebuild-th-kernel.sh

index 303ec58660902476aa9c17a5ed81fed81d8be8e4..7d839cfd743af9d9d266af58915e4a79d54d7f0d 100755 (executable)
@@ -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
This page took 0.271098 seconds and 4 git commands to generate.