Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for calculating the next prerelease tag #125

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

bradleyjones
Copy link
Contributor

@bradleyjones bradleyjones commented Aug 22, 2023

Adds a prerelease command which will increment the prerelease version based on what the next version will be from the git log, taking into account the current prerelease version from the latest tag.

If --pre-release is passed in and contains a number then this will be used and all calculations will be skipped. If --pre-release is passed in and it matches the pre-release suffix of the current tag then calculations will still occur.

Example:

$ svu current
v1.2.3-alpha.2+123

$ svu prerelease
v1.2.3-alpha.3

$ svu prerelease --pre-release alpha.33 --build 243
v1.2.3-alpha.33+243

Fixes: #112

Adds a `prerelease` command which will increment the prerelease version
based on what the next version will be from the git log, taking into
account the current prerelease version from the latest tag.

If `--pre-release` is passed in and contains a number then this will be
used and all calculations will be skipped. If `--pre-release` is passed
in and it matches the pre-release suffix of the current tag then
calculations will still occur.

Example:
```bash
$ svu current
v1.2.3-alpha.2+123

$ svu prerelease
v1.2.3-alpha.3

$ svu prerelease --pre-release alpha.33 --build 243
v1.2.3-alpha.33+243
```

Signed-off-by: Bradley Jones <jones.bradley@me.com>
main.go Outdated Show resolved Hide resolved
@caarlos0
Copy link
Owner

hey! thanks for the PR!

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>
@bradleyjones
Copy link
Contributor Author

@caarlos0 latest commit changes the --pre-release flag as a subcommand of prerelease but left the build flag alone as we discussed previously. Hopefully this should be good to go!

@caarlos0 caarlos0 merged commit 881d9c3 into caarlos0:main Sep 12, 2023
1 check passed
@caarlos0
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for new feature: Increment pre-release version number
2 participants