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

first tag with a given version is not used #378

Merged
merged 1 commit into from
Sep 14, 2020
Merged

Conversation

adamralph
Copy link
Owner

Version(s)

2.3.0

To reproduce

image

Run MinVer against a repo which looks like ☝️.

Expected behaviour

The tag on the first (blue) branch is used, since that branch was the current branch when the merged was performed. The version is 1.0.0-alpha.2.

Actual behaviour

The tag on the second (yellow) branch is used. The version is 1.0.0-alpha.1.

Workarounds

Tag some commit to coerce the version into being something you expect.

Additional context

Found while fixing #377. Thanks again to @karlika for spotting that bug!

Another approach is to ignore the 1.0.00 tag, since it is not valid SemVer due to the leading zero in the patch version. However, there may be other cases where the two tags could produce the same version, e.g. using special chars, so it's probably better to just assume that it is possible for two tags to produce the same version.

@adamralph adamralph added the bug Something isn't working label Sep 14, 2020
@adamralph adamralph added this to the 2.3.1 milestone Sep 14, 2020
@adamralph adamralph changed the title first of two tags having the same version is not used first of two tags withthe same version is not used Sep 14, 2020
@adamralph adamralph changed the title first of two tags withthe same version is not used first of two tags with the same version is not used Sep 14, 2020
@adamralph adamralph changed the title first of two tags with the same version is not used first tag with a given version is not used Sep 14, 2020
@adamralph adamralph merged commit 9226082 into master Sep 14, 2020
@adamralph adamralph deleted the two-tags-one-version branch September 14, 2020 09:25
@adamralph
Copy link
Owner Author

release in 2.3.1-beta.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant