[packages/rpm-build-macros] use git idiom to determine last auto tag
draenog
draenog at pld-linux.org
Sun Aug 5 03:55:47 CEST 2012
commit b425fbbb75ff0458cd9fa8c0a0d3b8db72b6a89e
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Sun Aug 5 02:54:19 2012 +0100
use git idiom to determine last auto tag
rpm-build.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/rpm-build.sh b/rpm-build.sh
index 1a6ef68..ac44f38 100755
--- a/rpm-build.sh
+++ b/rpm-build.sh
@@ -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
}
More information about the pld-cvs-commit
mailing list