| name | release-sync |
| description | Synchronize dev and main branches for LAMB releases, including merging changes, creating version tags, and bumping version numbers in code. Use this skill when creating a new release, syncing branches, or tagging a version. |
Release Synchronization Skill
This skill guides the complete process of creating a new release for the LAMB project, including branch synchronization, version tagging, and code version bumping.
When to Use This Skill
Use this skill when you need to:
- Create a new release version (e.g., v0.5, v0.6)
- Sync the
dev branch with commits from main
- Merge
dev branch changes into main
- Create and push version tags
- Update the version number displayed in the LAMB UI
Prerequisites
Before starting, ensure:
- Clean working tree (no uncommitted changes)
- Push access to both
dev and main branches
- Node.js is installed for running the version generation script
Release Process
Step 1: Fetch Latest Changes
Always start by fetching the latest state from remote:
git fetch origin
Step 2: Sync Main → Dev
First, bring any commits from main that aren't in dev:
Check what will be merged (dry-run):
git checkout dev
git log --oneline dev..origin/main | head -20
git log --oneline dev..origin/main | wc -l
Test for conflicts:
git merge --no-commit --no-ff origin/main
git merge --abort
Perform the actual merge:
git merge origin/main
git push origin dev
Step 3: Sync Dev → Main (Fast-Forward)
Next, bring dev commits into main using a fast-forward merge:
Switch to main and update:
git checkout main
git pull origin main
Check what will be merged:
git log --oneline main..origin/dev | head -20
git log --oneline main..origin/dev | wc -l
Verify fast-forward is possible:
git merge-base --is-ancestor main origin/dev && echo "Fast-forward possible" || echo "Fast-forward NOT possible"
Perform the fast-forward merge:
git merge --ff-only origin/dev
git push origin main
Step 4: Create Version Tag
Determine the next version number and create the tag:
Check previous tags:
git tag --sort=-v:refname | head -5
Create and push the tag:
git tag -a v0.X -m "Release v0.X"
git push origin v0.X
Step 5: Bump Version in Code
Update the version number displayed in the LAMB UI banner.
Important Version Bumping Rules:
- Version is defined in
frontend/svelte-app/scripts/generate-version.js
- Run the generator script to create
src/lib/version.js
- Only commit the generator script, NOT the generated
version.js file
- The generated file is built during deployment
Update version number:
- Edit
frontend/svelte-app/scripts/generate-version.js
- Change the version line:
version: '0.4' → version: '0.5'
- Regenerate the version file:
node frontend/svelte-app/scripts/generate-version.js
- Stage and commit only the generator script:
git add frontend/svelte-app/scripts/generate-version.js
git commit -m "chore: bump version to 0.X"
git push origin main
Step 6: Update Tag to Include Version Bump
Move the tag to point to the commit that includes the version bump:
git tag -d v0.X
git push origin :refs/tags/v0.X
git tag -a v0.X -m "Release v0.X"
git push origin v0.X
Step 7: Sync Version Bump Back to Dev
Ensure dev branch also has the version bump:
git checkout dev
git merge main --ff-only
git push origin dev
Troubleshooting
Merge Conflicts in Step 2
If the merge from main to dev has conflicts:
- Resolve conflicts manually in the affected files
- Stage resolved files:
git add <files>
- Complete the merge:
git commit
- Push:
git push origin dev
- Continue with remaining steps
Fast-Forward Fails in Step 3
If git merge --ff-only fails:
- This means
main has commits that dev doesn't have
- Verify you completed Step 2 correctly
- If
main legitimately has new commits, use a regular merge instead:
git merge origin/dev
Note: This creates a merge commit instead of a clean fast-forward
Tag Already Exists
If the tag already exists remotely, you'll need to delete it first:
git push origin :refs/tags/v0.X
Quick Reference
Complete release in one sequence (after dry-run validation):
git checkout dev && git merge origin/main && git push origin dev
git checkout main && git pull origin main && \
git merge --ff-only origin/dev && git push origin main
git tag -a v0.X -m "Release v0.X" && git push origin v0.X
node frontend/svelte-app/scripts/generate-version.js
git add frontend/svelte-app/scripts/generate-version.js
git commit -m "chore: bump version to 0.X" && git push origin main
git tag -d v0.X && git push origin :refs/tags/v0.X
git tag -a v0.X -m "Release v0.X" && git push origin v0.X
git checkout dev && git merge main --ff-only && git push origin dev
Verification
After completing all steps, verify the final state:
git log --oneline --graph --all -5
git show v0.X
git tag --sort=-v:refname | head -5
Expected result: Both main and dev should be at the same commit with the tag v0.X pointing to that commit.
Related Files
- Version generator:
frontend/svelte-app/scripts/generate-version.js
- Version documentation:
CLAUDE.md (Version Bumping section)
- Generated version file:
frontend/svelte-app/src/lib/version.js (auto-generated, do not commit)
Resources
For more information about the LAMB project's version bumping process, see the Version Bumping section in CLAUDE.md.