| name | snaptray-bump-version |
| description | Bump the SnapTray app version in this repository when the user asks to bump version, release a new patch version, or update the app version number. Use only for SnapTray version bumps. The source of truth is `project(SnapTray VERSION ...)` in `CMakeLists.txt`. Every release bump must also update `CHANGELOG.md` with curated user-facing highlights derived from commit messages between the previous release tag and the new version, then create the matching local `v<version>` tag without pushing it. Prefer patch bumps unless the user gives an exact target version. |
SnapTray bump version
Use this skill when the user asks to bump SnapTray's version.
Rules
- Treat
project(SnapTray VERSION ...) in CMakeLists.txt as the source of truth.
- By default, bump only the patch version.
- If the user gives an explicit target version, use that exact version instead of auto-incrementing.
- Determine the previous release tag before editing anything. Prefer the exact tag for the pre-bump version, such as
v1.0.41. If it does not exist, fall back to the nearest lower semantic-version tag and note the fallback in the final report.
- If
CHANGELOG.md is missing, create it before release prep with the standard SnapTray scaffold:
# Changelog
- short explanatory intro
## [Unreleased]
- an empty or placeholder bullet
CHANGELOG.md is required for every releasable bump. The new version section must be curated from commit subjects in the range <previous_tag>..HEAD, gathered with git log --no-merges --format=%s.
- Do not dump raw commit subjects into
CHANGELOG.md. Collapse related commits into concise, user-facing bullets grouped under Added, Improved, and Fixed when applicable. Ignore docs/test/chore noise unless it materially affects users, installers, or release behavior.
- Use the local current date for version headings in
CHANGELOG.md, in the format ## [1.0.42] - YYYY-MM-DD.
- Create the local tag
v<version> after the release-prep commit is created and verified. Never push the tag.
- If
refs/tags/v<version> already exists locally, stop and inspect instead of moving or recreating it.
- Do not add Xcode or
MARKETING_VERSION guidance. SnapTray release versioning is CMake-driven.
- Do not edit generated version outputs or duplicate version strings elsewhere unless the task explicitly requires it.
- Before committing, run
git diff --check.
- Verify the release notes with
python3 scripts/extract_changelog_entry.py <version>.
- Verify the local tag with
git rev-parse -q --verify refs/tags/v<version>.
- Follow the repo's Conventional Commit + Lore trailer protocol for the release-prep commit. Do not use a bare version-number commit message.
Workflow
- Read the current version from
CMakeLists.txt.
- Decide the next version:
- explicit version from the user wins
- otherwise increment the patch number
- Determine the previous release tag for the pre-bump version and gather commit subjects for the release window:
- prefer
v<current_version> when it exists
- gather source material with
git log --no-merges --format=%s <previous_tag>..HEAD
- Update
project(SnapTray VERSION ...) in CMakeLists.txt.
- Ensure
CHANGELOG.md exists:
- if missing, create the standard scaffold with
# Changelog, the short intro text, and a top-level ## [Unreleased] section
- Update
CHANGELOG.md for the bumped version:
- create or replace
## [<version>] - <today> with curated release notes derived from the commit subjects in the release window
- prefer shipped user-visible outcomes over internal implementation detail
- merge repetitive fixes or perf commits into a few meaningful bullets instead of preserving commit granularity
- keep
## [Unreleased] only as a staging area for future work; do not use placeholder bullets in the releasable version section
- Keep the change minimal. Do not edit release docs, generated outputs, or unrelated files.
- Verify with
git diff --check.
- Run
python3 scripts/extract_changelog_entry.py <version>.
- Stage and create the release-prep commit:
git add CMakeLists.txt CHANGELOG.md
- commit with a Conventional Commit subject plus Lore trailers, for example:
chore(release): prepare v1.0.42
Constraint: SnapTray release notes are sourced from CHANGELOG.md
Constraint: Release notes must reflect the commit window since the previous tag
Rejected: Copy raw commit subjects into CHANGELOG.md | too noisy for release consumers
Confidence: high
Scope-risk: narrow
Directive: Keep CHANGELOG.md, CMakeLists.txt, and the local release tag aligned for every version bump
Tested: git diff --check; python3 scripts/extract_changelog_entry.py 1.0.42
Not-tested: Tag push and GitHub Actions release run
- Create the local tag with
git tag v<version>.
- Verify the tag with
git rev-parse -q --verify refs/tags/v<version>.
- Stop after the local tag. Do not push the tag or trigger publishing unless the user explicitly asks.
Notes
- SnapTray's release path is
CHANGELOG.md -> GitHub Release body -> website release page.
- SnapTray packaging scripts already read the version from
CMakeLists.txt, so versioning should stay single-source.
- If
CHANGELOG.md does not exist yet, this skill should create the file instead of treating that as a blocker.
- A SnapTray version bump is release prep in this repo: the done state includes a curated changelog entry and a matching local tag.
- Even after the local tag exists, do not push the release tag automatically; leave tag push to manual execution.
- Use commit messages as source material, not as final prose. The changelog should read like release notes, not
git log.
- Keep the change minimal. A version bump task is not a cleanup or release-refactor task.