[packages/rpm-build-tools/tag_checking: 2/2] Check for existence of tag during tagging
draenog
draenog at pld-linux.org
Wed Jul 11 03:15:49 CEST 2012
commit ace99bc63a7bb8a7486f4391f30cd375e18bc122
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Wed Jul 11 01:19:43 2012 +0100
Check for existence of tag during tagging
Fails only when requested tag already exists and points to a different
commit. It is to allow rebuilding of auto tags.
builder.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/builder.sh b/builder.sh
index 44aaac8..398674c 100755
--- a/builder.sh
+++ b/builder.sh
@@ -1385,9 +1385,13 @@ tag_files() {
cd "$PACKAGE_DIR"
- update_shell_title "tag sources: $_tag"
- git $OPTIONS $_tag || exit
- git push $CVS_FORCE $REMOTE_PLD tag $_tag || Exit_error err_remote_problem $REMOTE_PLD
+ if tag_exist $_tag || [ -n "$CVS_FORCE" ]; then
+ update_shell_title "tag sources: $_tag"
+ git $OPTIONS $_tag || exit
+ git push $CVS_FORCE $REMOTE_PLD tag $_tag || Exit_error err_remote_problem $REMOTE_PLD
+ else
+ echo "Tag $_tag already exists and points to the same commit"
+ fi
}
branch_files() {
More information about the pld-cvs-commit
mailing list