| name | ship |
| description | Ship the current branch — push, squash-merge to main via PR, tag, and clean up. Use when ready to merge and release. |
Ship the current branch to main.
Prerequisites
- Must NOT be on
main branch already. If on main, abort with a message.
- Working tree should be clean. If not, warn the user.
Steps
- Get the current branch name.
- Push the branch to origin:
git push -u origin <branch>.
- Create a PR targeting main using
gh pr create. Use the squashed commit subjects as the PR body.
- Squash-merge the PR:
gh pr merge --squash --delete-branch.
- Checkout main and pull:
git checkout main && git pull.
- Delete the local branch if it still exists:
git branch -d <branch>.
- Tag (auto-detect):
- Read the version from
pubspec.yaml and prefix with v (e.g. v2.0.1).
- If that tag already exists (
git tag -l <tag>), skip tagging.
- Otherwise, create and push the tag:
git tag -a <tag> -m "<tag>" && git push origin <tag>.
- Confirm completion with a summary (mention whether a tag was created or skipped).