diff --git a/build_and_push.sh b/build_and_push.sh index 6282762..cccd531 100755 --- a/build_and_push.sh +++ b/build_and_push.sh @@ -229,10 +229,12 @@ git_commit_and_push() { exit 1 fi - if git push --tags > /dev/null 2>&1; then - print_success "Pushed tags" + # Push only the new tag to avoid conflicts with existing tags + if git push origin "$NEW_VERSION" > /dev/null 2>&1; then + print_success "Pushed tag: $NEW_VERSION" else - print_warning "Failed to push tags" + print_error "Failed to push tag: $NEW_VERSION" + exit 1 fi }