https://github.com/elgohr/semv
Working with semvers
https://github.com/elgohr/semv
cli semver versioning
Last synced: 4 months ago
JSON representation
Working with semvers
- Host: GitHub
- URL: https://github.com/elgohr/semv
- Owner: elgohr
- License: apache-2.0
- Created: 2021-07-13T12:11:18.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T02:04:24.000Z (4 months ago)
- Last Synced: 2025-03-13T03:18:58.909Z (4 months ago)
- Topics: cli, semver, versioning
- Language: Go
- Homepage:
- Size: 6.75 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# semv
semv (pronounce [zɛmpf]) is a command line tool for working with semantic versions (semver).
[](https://github.com/elgohr/semv/actions)
[](https://github.com/elgohr/semv/actions)## Installation
### Go
```bash
go install github.com/elgohr/semv@latest
```### Binaries
Find the binaries in the releases.## Usage
### Increment
Returns the incremented version.
With the version as a variable
```bash
semv increment (--patch/--minor/--major) ${currentVersion}
```Piped from another command
```bash
cat oldVersion.txt | semv increment (--patch/--minor/--major)
```### Compare
```bash
semv compare ${firstVersion} ${secondVersion}
```| Result | Description |
| ------ | ----------------------------------------------- |
| -1 | ${firstVersion} is lower than ${secondVersion} |
| 0 | ${firstVersion} is equal than ${secondVersion} |
| 1 | ${firstVersion} is higher than ${secondVersion} |## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.
## License
[Apache 2.0](https://choosealicense.com/licenses/apache-2.0/)