Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elgohr/semv
Working with semvers
https://github.com/elgohr/semv
cli semver versioning
Last synced: 2 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 (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T19:00:34.000Z (7 months ago)
- Last Synced: 2024-10-10T18:46:47.928Z (3 months ago)
- Topics: cli, semver, versioning
- Language: Go
- Homepage:
- Size: 5.11 MB
- Stars: 2
- Watchers: 2
- 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).
[![Test Status](https://github.com/elgohr/semv/workflows/Test/badge.svg)](https://github.com/elgohr/semv/actions)
[![Security Status](https://github.com/elgohr/semv/workflows/Gosec/badge.svg)](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/)