https://github.com/caarlos0/svu
semantic version utility
https://github.com/caarlos0/svu
golang hacktoberfest semantic-versioning util
Last synced: 13 days ago
JSON representation
semantic version utility
- Host: GitHub
- URL: https://github.com/caarlos0/svu
- Owner: caarlos0
- License: mit
- Created: 2017-12-13T16:54:42.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T08:54:48.000Z (29 days ago)
- Last Synced: 2025-04-05T11:01:44.544Z (20 days ago)
- Topics: golang, hacktoberfest, semantic-versioning, util
- Language: Go
- Homepage:
- Size: 2.61 MB
- Stars: 642
- Watchers: 9
- Forks: 50
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ccamel - caarlos0/svu - semantic version utility (Go)
- stars - svu
README
![]()
semantic version utility
semantic version utility (svu) is a small helper for release scripts and workflows.
It provides utility commands and functions to increase specific portions of the version.
It can also figure the next version out automatically by looking through the git history.> [!TIP]
> Read [the spec][Semver] for more information.## usage
Check `svu --help` for the list of sub-commands and flags.
### `next`, `n`
This is probably the command you'll use the most.
It checks your `git log`, and automatically increases and returns the new
version based on this table:| Commit message | Tag increase |
| -------------------------------------------------------------------------------------- | ------------ |
| `chore: foo` | Nothing |
| `fix: fixed something` | Patch |
| `feat: added new button to do X` | Minor |
| `fix: fixed thing xyz`
`BREAKING CHANGE: this will break users because of blah` | Major |
| `fix!: fixed something` | Major |
| `feat!: added blah` | Major |> [!TIP]
> You can create an alias to create tags automatically:
>
> ```bash
> alias gtn='git tag $(svu next)'
> ```## configuration
Every flag option can also be set in a `.svu.yml` in the current
directory/repository root folder, for example:```yaml
tag.prefix: ""
always: true
v0: true
```Names are the same as the flags themselves.
## install
[](https://repology.org/project/svu/versions)
macOS
```bash
brew install caarlos0/tap/svu
```linux/apt
```bash
echo 'deb [trusted=yes] https://apt.fury.io/caarlos0/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install svu
```linux/yum
```bash
echo '[caarlos0]
name=caarlos0
baseurl=https://yum.fury.io/caarlos0/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/caarlos0.repo
sudo yum install svu
```docker
```bash
docker run --rm -v $PWD:/tmp --workdir /tmp ghcr.io/caarlos0/svu --help
```
go install
```bash
go install github.com/caarlos0/svu/v3@latest
```manually
Or download one from the [releases tab](https://github.com/caarlos0/svu/releases) and install manually.
## stargazers over time
[](https://starchart.cc/caarlos0/svu)
[Semver]: https://semver.org
---
Logo art and concept by [@carinebecker](https://github.com/carinebecker).