Add force push for updated tags

This commit is contained in:
Your Name
2025-09-06 05:11:11 -04:00
parent 70c91ec858
commit 2e4ffc0e79

View File

@@ -240,8 +240,13 @@ git_commit_and_push() {
if git push origin "$NEW_VERSION" > /dev/null 2>&1; then
print_success "Pushed tag: $NEW_VERSION"
else
print_error "Failed to push tag: $NEW_VERSION"
exit 1
print_warning "Tag push failed, trying force push..."
if git push --force origin "$NEW_VERSION" > /dev/null 2>&1; then
print_success "Force-pushed updated tag: $NEW_VERSION"
else
print_error "Failed to push tag: $NEW_VERSION"
exit 1
fi
fi
}
@@ -283,8 +288,13 @@ git_commit_and_push_no_tag() {
if git push origin "$NEW_VERSION" > /dev/null 2>&1; then
print_success "Pushed tag: $NEW_VERSION"
else
print_error "Failed to push tag: $NEW_VERSION"
exit 1
print_warning "Tag push failed, trying force push..."
if git push --force origin "$NEW_VERSION" > /dev/null 2>&1; then
print_success "Force-pushed updated tag: $NEW_VERSION"
else
print_error "Failed to push tag: $NEW_VERSION"
exit 1
fi
fi
}