Get correct next version when using onlyGraduateWithReleaseLabel #2229
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using the onlyGraduateWithReleaseLabel for shipit the next prerelease version was being calculated as the latest tag not present in the main branch. This is problematic when the prerelease and main branch are the same (as is the case for onlyGraduateWithReleaseLabel)
This would cause auto to always create the -next.0 tag for a release (since it's based off of the latest release in the repo), and publishing would fail due to conflicting versions being published.
This change update the calculation in the version-file plugin to use getLatestTagInBranch() when the current and main branch are the same.
A similar change (or broken out into a standalone util) may be needed for other versioning plugins
🐤 Download canary assets:
auto-linux--canary.2229.26380.gz
auto-macos--canary.2229.26380.gz
auto-win.exe--canary.2229.26380.gz
📦 Published PR as canary version:
under canary scope @[email protected]
✨ Test out this PR locally via: