]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm-build.sh
fetch tags before figuring out last tag
[packages/rpm-build-macros.git] / rpm-build.sh
index 1a6ef686650aadebde05e0c72fdcf9eeedb70a3b..a04dc94ea6383e7b6b37c1b44e75ad5e306e0dbc 100755 (executable)
@@ -120,7 +120,9 @@ autotag() {
                s=${s%:*}
                # ensure package ends with .spec
                s=${s%.spec}.spec
-               out=$(git tag | awk "/auto\/$dist\//{if (!a++) print \$1}")
+               git fetch --tags
+               out=$(git for-each-ref --count=1 --sort=-authordate refs/tags/auto/$dist \
+                       --format='%(refname:short)')
                echo "$s:$out"
        done
 }
This page took 0.038941 seconds and 4 git commands to generate.