---
name: Version Bump
slug: version-bump-2
category: DevOps
description: "Version Bump automates the Wayland release version update flow: edits package.json, runs checks and tests, then branches, commits, pushes, opens a PR, and tags the release after merge."
github: "https://github.com/FerroxLabs/wayland/tree/main/.claude/skills/bump-version"
language: TypeScript
stars: 596
forks: 113
install: "npx degit https://github.com/FerroxLabs/wayland/tree/main/.claude/skills/bump-version ~/.claude/skills/bump-version"
installs_to: ~/.claude/skills/bump-version
source_path: .claude/skills/bump-version/SKILL.md
collection_size: 25
category_size: 868
collection_url: "https://dirskills.com/collections/FerroxLabs/wayland"
added: 2026-09-03T06:03:20.681Z
last_synced: 2026-09-03T06:03:20.681Z
canonical_url: "https://dirskills.com/skills/version-bump-2"
---

# Version Bump

Version Bump automates the Wayland release version update flow: edits package.json, runs checks and tests, then branches, commits, pushes, opens a PR, and tags the release after merge.

**Install:**

```bash
npx degit https://github.com/FerroxLabs/wayland/tree/main/.claude/skills/bump-version ~/.claude/skills/bump-version
```

## README

# Bump Version

Automate the Wayland version bump workflow: update version → quality checks → branch → commit → push → PR → tag.

**Usage:** `/bump-version [version]`

- `/bump-version 1.8.17` - bump to specified version
- `/bump-version` - auto-increment patch (e.g. `1.8.16` → `1.8.17`)

## Workflow

### Step 1: Pre-flight Checks

```bash
git branch --show-current
git status --short
```

- **Not on `main`** → Stop: "Please switch to main before running bump-version."
- **Dirty working tree** → Stop: "There are uncommitted changes. Please commit or stash them first."

### Step 2: Pull Latest

```bash
git pull --rebase origin main
```

Fails → Stop: "Failed to pull latest code. Please resolve conflicts or network issues first."

### Step 3: Determine Target Version

Read `package.json` → extract `version` field.

- **Argument provided** → use as-is
- **No argument** → parse `major.minor.patch`, increment `patch` by 1

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

### Step 4: Update package.json

Use Edit tool to replace:

- old: `"version": "{current}"`
- new: `"version": "{target}"`

### Step 5: Quality Checks

```bash
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 silently.
- **tsc fails** → Stop: "TypeScript errors found. Please fix them before bumping the version."

### Step 6: Run Tests

```bash
bunx vitest run
```

Fails → Stop: "Tests failed. Please fix failing tests before bumping the version."

### Step 7: Branch, Commit, Push

```bash
git checkout -b chore/bump-version-{target}
git add -A
git commit -m "chore: bump version to {target}"
git push -u origin chore/bump-version-{target}
```

### Step 8: Create PR

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

Display PR URL. Then pause:

> "PR created: {URL}. Please notify a team member to merge it, then confirm to continue."

**Wait for user confirmation before proceeding.**

### Step 9: Cleanup After Merge

```bash
git checkout main
git pull --rebase origin main
git branch -d chore/bump-version-{target}
```

Check if remote branch still exists:

```bash
git ls-remote --heads origin chore/bump-version-{target}
```

- **Has output** → delete remote: `git push origin --delete chore/bump-version-{target}`
- **No output** → skip.

### Step 10: Create and Push Tag

```bash
git tag v{target}
git push origin v{target}
```

Display: "Tag v{target} created and pushed. Version bump complete!"

## Quick Reference

```
1. Must be on clean main
2. git pull --rebase
3. Determine target version
4. Edit package.json
5. lint + format + tsc
6. vitest run
7. branch chore/bump-version-{target} → commit → push
8. gh pr create → wait for merge
9. checkout main → pull → delete branch
10. git tag v{target} && git push origin v{target}
```
