An interactive tool to help you determine the correct semantic version bump for your project. Choose between MAJOR, MINOR, or PATCH version updates using a guided decision tree.
Semantic Versioning (SemVer) uses a three-part version number: MAJOR.MINOR.PATCH (e.g., 1.2.3)
- MAJOR (X.0.0): Breaking changes that are incompatible with previous versions
- MINOR (X.Y.0): New features added in a backwards-compatible manner
- PATCH (X.Y.Z): Bug fixes and internal improvements without API changes
Learn more at semver.org
The web interface is automatically deployed to GitHub Pages. Access it here:
๐ Live Demo
Or open docs/index.html locally in your browser:
open docs/index.html
# or
firefox docs/index.htmlThe web interface is automatically deployed when you push changes to the docs/ directory using GitHub Actions.
Make the script executable and run it:
chmod +x semver.sh
./semver.shAnswer each question with Y (Yes) or N (No), and the tool will determine your next version.
The decision tree guides you through these questions:
-
Have you made ANY changes to your project?
- No โ PATCH (no version bump)
- Yes โ Continue
-
Have you made breaking changes? (non-backwards compatible)
- Yes โ MAJOR โ
- No โ Continue
-
Have you added NEW features? (backwards compatible)
- Yes โ MINOR โ
- No โ Continue
-
Have you only fixed bugs or improved performance?
- Yes โ PATCH โ
- No โ Continue
-
Are your changes INTERNAL ONLY? (tests, docs, build process)
- Yes โ PATCH โ
- No โ Continue
-
Are you unsure?
- Yes โ MINOR (safer default) โ
- No โ PATCH (minimal changes)
.
โโโ LICENSE # MIT License
โโโ README.md # This file
โโโ semver.sh # Bash command-line tool
โโโ docs/
โโโ index.html # Interactive web interface (deployed via GitHub Pages)
- Any modern web browser (Chrome, Firefox, Safari, Edge, etc.)
- No installation or dependencies needed
- Access via GitHub Pages or local file
- Bash shell (v3.0+)
- Linux, macOS, or Windows (with WSL/Git Bash)
This project uses GitHub Actions to automatically deploy the web interface from the docs/ directory:
-
Enable GitHub Pages in your repository settings:
- Go to Settings โ Pages
- Select "Deploy from a branch"
- Choose
mainbranch and/docsfolder - Save
-
GitHub Actions automatically deploys your changes when you push to the repository
-
Access your live demo at:
https://ahmedukamel.github.io/Semantic-Versioning-Decision-Tree/
The web interface will be updated automatically with each push to the repository!
- Open
index.htmlin your browser - Answer Yes/No questions
- Get your version recommendation with detailed explanation
- Click "Start Over" to analyze another change
$ ./semver.sh
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฆ Semantic Versioning Helper โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Path: Start
Progress: [โโโโโโโโโโโโโโโโโโโโ] 0%
Have you made ANY changes to your project?
[Y/N]: Y
# ... continue answering questions ...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ข MINOR VERSION BUMP โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Decision: MINOR Version Bump
You've added new backwards-compatible features.
Increment the second number: X.Y โ X.(Y+1).0
Format: MAJOR.MINOR.PATCH (e.g., 1.2.3)./semver.sh -h # Show help
./semver.sh --help # Show help
./semver.sh -v # Show version
./semver.sh --version # Show version- Removing or renaming public API methods
- Changing function signatures
- Modifying data structures in incompatible ways
- Breaking changes to configuration format
- Example:
1.0.0โ2.0.0
- Adding new features
- Adding new public API methods
- Deprecating features (with warnings)
- Performance improvements without API changes
- Example:
1.2.0โ1.3.0
- Fixing bugs
- Security patches
- Minor performance improvements
- Updating dependencies for internal use
- Documentation updates
- Example:
1.2.3โ1.2.4
| Change | Current | New |
|---|---|---|
| Bug fix | 1.2.3 | 1.2.4 |
| New feature | 1.2.3 | 1.3.0 |
| Breaking change | 1.2.3 | 2.0.0 |
| Multiple fixes | 1.2.3 | 1.2.5 |
| Multiple features | 1.2.3 | 1.4.0 |
-
Always reset MINOR and PATCH to 0 when bumping MAJOR
1.5.3โ2.0.0(not2.5.3)
-
Reset PATCH to 0 when bumping MINOR
1.2.5โ1.3.0(not1.3.5)
-
Use pre-release versions for testing before release
2.0.0-beta.1,2.0.0-rc.1
-
Document breaking changes clearly in your changelog
- Help users understand what needs to update
-
When in doubt, choose MINOR over MAJOR
- It's more conservative and safer for users
Found an issue or want to improve this tool? Feel free to submit issues or pull requests!
This project is open source and available under the MIT License.
Made with โค๏ธ by Ahmed Kamel
ยฉ 2025 Ahmed Kamel. All rights reserved.
Licensed under the MIT License - see LICENSE file for details.