| name | version-bump-tag |
| description | Expert guide for bumping versions, creating git tags, and managing releases for Tauri and Node.js projects. |
Version Bump & Tag Management — Development Guide
You are an expert on semantic versioning and release management. Use this knowledge when bumping versions, creating tags, or troubleshooting release pipelines.
What It Is
A systematic approach to version management that keeps all project files in sync, creates proper git tags, and triggers CI/CD release pipelines.
This project's scripts:
./app/scripts/bump-version.sh — Version bumping
./app/scripts/redeploy.sh — Re-trigger failed releases
Quick Reference (This Project)
./app/scripts/bump-version.sh patch
./app/scripts/bump-version.sh minor
./app/scripts/bump-version.sh major
git push && git push --tags
./app/scripts/bump-version.sh --set 2.0.0
./app/scripts/bump-version.sh patch --dry-run
./app/scripts/bump-version.sh patch --no-git
./app/scripts/redeploy.sh
./app/scripts/redeploy.sh v0.1.5
Semantic Versioning
MAJOR.MINOR.PATCH
│ │ └── Bug fixes (backward compatible)
│ └──────── New features (backward compatible)
└────────────── Breaking changes (incompatible API)
| Bump | When | Example |
|---|
patch | Bug fixes, minor tweaks | 1.0.0 → 1.0.1 |
minor | New features, no breaking changes | 1.0.0 → 1.1.0 |
major | Breaking changes, major rewrites | 1.0.0 → 2.0.0 |
Pre-release Versions
1.0.0-alpha.1 # Early development
1.0.0-beta.1 # Feature complete, testing
1.0.0-rc.1 # Release candidate
Version Files by Project Type
Tauri Applications (This Project)
| File | Format |
|---|
package.json | "version": "X.Y.Z" |
src-tauri/tauri.conf.json | "version": "X.Y.Z" |
src-tauri/Cargo.toml | version = "X.Y.Z" |
src-tauri/Cargo.lock | Auto-updated |
| UI status bar | Display string |
Node.js Projects
| File | Format |
|---|
package.json | "version": "X.Y.Z" |
package-lock.json | Auto-updated |
Rust Projects
| File | Format |
|---|
Cargo.toml | version = "X.Y.Z" |
Cargo.lock | Auto-updated |
Pre-Push Validation
Always validate before releasing:
git status --porcelain | grep -q . && echo "UNCOMMITTED CHANGES" && exit 1
git fetch origin
git log @{u}..HEAD --oneline | grep -q . && echo "UNPUSHED COMMITS" && exit 1
echo "Ready to release"
Full Validation Function
validate_ready_to_release() {
if [[ -n "$(git status --porcelain)" ]]; then
echo "ERROR: Uncommitted changes"
git status --short
return 1
fi
git fetch origin --quiet
local AHEAD=$(git log @{u}..HEAD --oneline 2>/dev/null | wc -l | tr -d ' ')
if [[ "$AHEAD" -gt 0 ]]; then
echo "ERROR: $AHEAD unpushed commit(s)"
return 1
fi
echo "Ready to release"
return 0
}
Git Tag Operations
Creating Tags
git tag -a v1.0.0 -m "Release v1.0.0"
git tag -a v1.0.0 -m "Release v1.0.0
- Feature: Added user auth
- Fix: Memory leak resolved
- Chore: Updated deps"
Pushing Tags
git push origin v1.0.0
git push --tags
git push && git push --tags
Listing Tags
git tag -l
git tag -l "v1.*"
git show v1.0.0
git describe --tags --abbrev=0
Deleting Tags
git tag -d v1.0.0
git push origin :refs/tags/v1.0.0
Recreating Tags (Re-release)
git tag -d v1.0.0
git push origin :refs/tags/v1.0.0
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0
Redeployment
When a release fails mid-build, use redeployment to re-trigger without version change.
What Redeploy Does
- Deletes tag locally (if exists)
- Deletes tag on remote (if exists)
- Recreates annotated tag at HEAD
- Pushes new tag
- CI/CD workflow re-triggers
Manual Redeployment
VERSION="v0.1.5"
git status --porcelain | grep -q . && echo "Uncommitted changes!" && exit 1
git tag -d "$VERSION" 2>/dev/null || true
git push origin ":refs/tags/$VERSION" 2>/dev/null || true
git tag -a "$VERSION" -m "Release $VERSION"
git push origin "refs/tags/$VERSION"
When to Redeploy
- CI/CD workflow failed mid-build
- Build artifacts corrupted
- Code signing failed
- Secrets/environment updated
- Artifact upload failed
Complete Release Workflow
Manual Steps
git status
CURRENT=$(jq -r '.version' package.json)
IFS='.' read -r major minor patch <<< "$CURRENT"
NEW="${major}.${minor}.$((patch + 1))"
git add -A
git commit -m "chore: bump version to v${NEW}"
git tag -a "v${NEW}" -m "Release v${NEW}"
git push && git push --tags
Using This Project's Script
./app/scripts/bump-version.sh patch
git push && git push --tags
The script handles steps 2-6 automatically.
Version Comparison in Bash
VERSION="1.2.3"
IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
PATCH=$((PATCH + 1))
NEW="${MAJOR}.${MINOR}.${PATCH}"
MINOR=$((MINOR + 1)); PATCH=0
NEW="${MAJOR}.${MINOR}.${PATCH}"
MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0
NEW="${MAJOR}.${MINOR}.${PATCH}"
Useful Commands
| Action | Command |
|---|
| Current version | jq -r '.version' app/package.json |
| Latest tag | git describe --tags --abbrev=0 |
| All tags | git tag -l |
| Remote tags | git ls-remote --tags origin |
| Tag exists? | git rev-parse v1.0.0 >/dev/null 2>&1 && echo "exists" |
| Commits since tag | git log v1.0.0..HEAD --oneline |
Common Gotchas
- Tag format must match workflow trigger — If workflow triggers on
v*, use v0.1.0 not 0.1.0.
- Push commits before tags — Tags reference commits; the commit must exist on remote first.
- Version files must all match — Mismatch causes build failures. Use the bump script.
- Cargo.lock needs regeneration — After editing Cargo.toml, run
cargo update -p <pkg>.
- Don't amend tagged commits — Creates divergent history. Create new commit + tag instead.
- Annotated tags for releases — Lightweight tags (
git tag v1.0.0) lack metadata. Use -a.
- Tag deletion is not instant — GitHub may cache tags briefly. Wait a moment before recreating.
- CI runs against tagged commit — Ensure all changes are committed before tagging.
- Pre-release versions sort correctly —
1.0.0-alpha.1 < 1.0.0-beta.1 < 1.0.0-rc.1 < 1.0.0
- Conventional commits for bumps — Use
chore: bump version to vX.Y.Z or release: vX.Y.Z.