v0.2.5 - Fix increment_and_push upstream auto-setup and finalize SIGINT shutdown fix
This commit is contained in:
@@ -299,11 +299,29 @@ git_commit_and_push_no_tag() {
|
||||
|
||||
# Push changes
|
||||
print_status "Pushing to remote repository..."
|
||||
if git push > /dev/null 2>&1; then
|
||||
print_success "Pushed changes"
|
||||
local current_branch
|
||||
current_branch=$(git branch --show-current 2>/dev/null || echo "")
|
||||
|
||||
if git rev-parse --abbrev-ref --symbolic-full-name "@{u}" > /dev/null 2>&1; then
|
||||
if git push > /dev/null 2>&1; then
|
||||
print_success "Pushed changes"
|
||||
else
|
||||
print_error "Failed to push changes"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
print_error "Failed to push changes"
|
||||
exit 1
|
||||
if [[ -z "$current_branch" ]]; then
|
||||
print_error "Unable to determine current branch for push"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_warning "No upstream configured for branch '$current_branch'; setting upstream to origin/$current_branch"
|
||||
if git push -u origin "$current_branch" > /dev/null 2>&1; then
|
||||
print_success "Pushed changes and configured upstream"
|
||||
else
|
||||
print_error "Failed to push changes while configuring upstream"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Push only the new tag to avoid conflicts with existing tags
|
||||
|
||||
Reference in New Issue
Block a user