feat(release): sync version back to codebase after release
Adds step 5 to pull version commit from codebase-release back to codebase, keeping VERSION.json in sync automatically. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
cb417f4d52
commit
a5c3c657f3
1 changed files with 22 additions and 9 deletions
|
|
@ -206,17 +206,30 @@ else
|
|||
fi
|
||||
|
||||
# =============================================================================
|
||||
# STEP 4: Push version commit and tags to remotes
|
||||
# STEP 4: Push tags to gitlab
|
||||
# =============================================================================
|
||||
log_step "Pushing version and tags..."
|
||||
log_step "Pushing to gitlab..."
|
||||
|
||||
# Push version commit back to codebase (so VERSION.json stays in sync)
|
||||
run_cmd git push origin main || log_warn "Push to codebase failed"
|
||||
|
||||
# Push tags to gitlab (the actual remote)
|
||||
run_cmd git push gitlab main --tags || log_warn "Push to gitlab failed"
|
||||
|
||||
log_success "Pushed to remotes"
|
||||
log_success "Pushed to gitlab"
|
||||
|
||||
# =============================================================================
|
||||
# STEP 5: Sync version back to codebase
|
||||
# =============================================================================
|
||||
log_step "Syncing version back to codebase..."
|
||||
|
||||
cd "$CODEBASE_ROOT"
|
||||
log_info "Working directory: $CODEBASE_ROOT"
|
||||
|
||||
# Pull the version commit from codebase-release
|
||||
run_cmd git fetch "$RELEASES_ROOT" main
|
||||
run_cmd git merge FETCH_HEAD --ff-only || {
|
||||
log_warn "Could not fast-forward merge, manual sync needed"
|
||||
log_info "Run: cd codebase && git pull ../codebase-release main"
|
||||
}
|
||||
|
||||
log_success "Codebase synced with version $NEW_VERSION"
|
||||
|
||||
# =============================================================================
|
||||
# DONE
|
||||
|
|
@ -227,8 +240,8 @@ if [[ "$DRY_RUN" == "true" ]]; then
|
|||
log_info "Run without --dry-run to execute"
|
||||
else
|
||||
log_header "Release v$NEW_VERSION Complete"
|
||||
log_info "View release: cd codebase-releases && git log --oneline -1"
|
||||
log_info "View tag: git show v$NEW_VERSION"
|
||||
log_info "Codebase VERSION.json updated"
|
||||
log_info "Tag v$NEW_VERSION pushed to gitlab"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue