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

Prerelease is causing some inc- outputs to not increment #723

Closed
buddhamangler-cbre opened this issue Feb 22, 2024 · 1 comment
Closed

Comments

@buddhamangler-cbre
Copy link

buddhamangler-cbre commented Feb 22, 2024

Existence of prerelease in input version is causing inc-major, inc-minor, and inc-patch to not increment. See below for two runs, one with version 'v1.0.0' and one with 'v1.0.0-0.12'

Run madhead/semver-utils@v4
with:
lenient: false
version: v1.0.0

{
release: 1.0.0,
major: 1,
minor: 0,
patch: 0,
inc-major: 2.0.0, <<<<< incremented correctly
inc-premajor: 2.0.0-0,
inc-minor: 1.1.0, <<<<< incremented correctly
inc-preminor: 1.1.0-0,
inc-patch: 1.0.1, <<<<< incremented correctly
inc-prepatch: 1.0.1-0,
inc-prerelease: 1.0.1-0
}


Run madhead/semver-utils@v4
with:
lenient: false
version: v1.0.0-0.12

{
release: 1.0.0,
major: 1,
minor: 0,
patch: 0,
inc-major: 1.0.0, <<<<< not incremented
inc-premajor: 2.0.0-0,
inc-minor: 1.0.0, <<<<< not incremented
inc-preminor: 1.1.0-0,
inc-patch: 1.0.0, <<<<< not incremented
inc-prepatch: 1.0.1-0,
inc-prerelease: 1.0.0-0.13,
prerelease: 0.12,
prerelease-parts: 2,
prerelease-0: 0,
prerelease-1: 12
}

@buddhamangler-cbre buddhamangler-cbre changed the title Prerelease is causing some inc- outputs to be incorrect Prerelease is causing some inc- outputs to not increment Feb 23, 2024
@madhead
Copy link
Owner

madhead commented Jun 5, 2024

Hey, this is just how the semver library works. Start a REPL an check yourself:

image

@madhead madhead closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants