]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
Check for existence of tag during tagging
[packages/rpm-build-tools.git] / builder.sh
index 44aaac8c5816a3f31302de25ecc70bdcffb28623..398674c8b7f26cd496a5c343cb5234d27dd37a59 100755 (executable)
@@ -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() {
This page took 0.073978 seconds and 4 git commands to generate.