Skip to content

first tag with a given version is not used#378

Merged
adamralph merged 1 commit intomasterfrom
two-tags-one-version
Sep 14, 2020
Merged

first tag with a given version is not used#378
adamralph merged 1 commit intomasterfrom
two-tags-one-version

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