]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
use git idiom to determine last auto tag
authorKacper Kornet <draenog@pld-linux.org>
Sun, 5 Aug 2012 01:54:19 +0000 (02:54 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Sun, 5 Aug 2012 01:55:11 +0000 (02:55 +0100)
rpm-build.sh

index 1a6ef686650aadebde05e0c72fdcf9eeedb70a3b..ac44f38e84dd071c27ec39bc6d4edd246e7d88e1 100755 (executable)
@@ -120,7 +120,8 @@ autotag() {
                s=${s%:*}
                # ensure package ends with .spec
                s=${s%.spec}.spec
-               out=$(git tag | awk "/auto\/$dist\//{if (!a++) print \$1}")
+               out=$(git for-each-ref --count=1 --sort=-authordate refs/tags/auto/$dist \
+                       --format='%(refname:short)')
                echo "$s:$out"
        done
 }
This page took 0.084137 seconds and 4 git commands to generate.