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

Get correct next version when using onlyGraduateWithReleaseLabel #2228

Conversation

adierkens
Copy link
Collaborator

@adierkens adierkens commented Jul 15, 2022

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

@adierkens adierkens added the patch Increment the patch version when merged label Jul 15, 2022
@adierkens adierkens force-pushed the next-with-onlyGraduateWithReleaseLabel branch from 93bce2e to 72d7460 Compare July 15, 2022 20:27
@adierkens adierkens closed this Jul 15, 2022
@adierkens adierkens deleted the next-with-onlyGraduateWithReleaseLabel branch July 15, 2022 20:40
@adierkens
Copy link
Collaborator Author

Reopened under #2229 to get canary version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant