Steps:
- •
Detect git changes: Run: git status
If no changes: exit with message
If changes exist: continue - •
Ask:
“Do you want to tag this as a versioned release?”
Suggest a version like:- •If last tag is
v1.1.2, suggestv1.1.3 - •Let user override or enter custom version
- •If last tag is
- •
Run: git diff --cached (or full diff if needed)
Summarize the key changes for the user and ask:
“Would you like me to update
CHANGELOG.mdwith these?”- •If yes:
- •
If a version was chosen, create a new section in
CHANGELOG.md:code## [v1.1.3] - 2024-02-09 ### Added - ... ### Changed - ... ### Fixed - ...
- •
If
CHANGELOG.mdhas a[Unreleased]section:“Move existing
[Unreleased]entries into this new version?”- •If yes: migrate them under the new tag
- •
If no version selected:
- •Prepend under
[Unreleased]
- •Prepend under
- •
- •If yes:
- •
Ask:
“What commit message should I use?”
(Suggest one if user doesn't provide.) - •
Commit changes: git add . git commit -m "[message]"
- •
If version selected: git tag v1.1.3
git push origin --tags - •
Push: git push
- •
Confirm success or show any errors.