Bump Version banner
iOfficeAI iOfficeAI

Bump Version

Git community intermediate

Description

Automate the AionUi version bump workflow: update version, install, branch, commit, push, and create PR.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for iOfficeAI/AionUi, shared by 3 entries in this directory. It describes the repository, not this entry specifically.

Bump Version

Automate the AionUi version bump workflow: update version, install, branch, commit, push, and create PR.

Usage

/bump-version [version]
  • /bump-version 1.8.17 — bump to the specified version
  • /bump-version — no argument: auto-increment patch of the current version (e.g. 1.8.161.8.17)

Steps

Step 1 — Pre-flight Checks

Run these commands and verify both conditions. If either fails, **stop immediately**.

git branch --show-current
git status --short
  • Not on main → Stop: "Please switch to the main branch before running bump-version."
  • Working tree is dirty (output is non-empty) → Stop: "There are uncommitted changes. Please commit or stash them first."

Step 2 — Pull Latest Code

git pull --rebase origin main
  • Fails → Stop: "Failed to pull latest code. Please resolve conflicts or network issues first."

Step 3 — Read Current Version

Read `package.json` and extract the `version` field value (e.g. `"1.8.16"`).

Step 4 — Determine Target Version

  • Argument provided: Use the supplied version string as-is.
  • No argument: Parse the current version as major.minor.patch, increment patch by 1, and assemble the new version string.

Display: "Bumping version: {current} → {target}"

Step 5 — Update package.json

Use the Edit tool to replace the `version` field in `package.json`:

  • old: "version": "{current}"
  • new: "version": "{target}"

Step 6 — Run Quality Checks

bun run lint
bun run format
bunx tsc --noEmit
  • lint fails → Stop: "Lint errors found. Please fix them before bumping the version."
  • format → Auto-fixes formatting issues silently.
  • tsc fails → Stop: "TypeScript errors found. Please fix them before bumping the version."
  • All pass → Proceed silently.

Step 7 — Run Tests

bunx vitest run
  • Fails → Stop: "Tests failed. Please fix failing tests before bumping the version."
  • Passes → Proceed silently.

Step 8 — Create Branch

git checkout -b chore/bump-version-{target}

Step 9 — Commit

git add -A
git commit -m "chore: bump version to {target}"

Step 10 — Push

git push -u origin chore/bump-version-{target}

Step 11 — Create PR

gh pr create --base main --title "chore: bump version to {target}" --body "Bump version to {target}"

Display the PR URL to the user when done.

Step 12 — Wait for PR to be Merged

Display: "PR created: {URL}. Please notify a team member to merge it, then continue with the following steps."

Pause here and wait for the user to confirm the PR has been merged before proceeding.

Step 13 — Switch Back to main and Pull Latest

git checkout main
git pull --rebase origin main

Step 14 — Delete Local Branch

git branch -d chore/bump-version-{target}

Step 15 — Delete Remote Branch (if not auto-deleted by GitHub)

Check whether the remote branch