]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm-build.sh
use git idiom to determine last auto tag
[packages/rpm-build-macros.git] / 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.087619 seconds and 4 git commands to generate.