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

Enable --minimize-semver-change for pr-release #2769

Merged
merged 1 commit into from
May 13, 2022

Conversation

JAForbes
Copy link
Collaborator

Minimizes semver changes on release to the minimum required version bump to satisfy major/minor/patch semver ranges.

Description

Minimizes the semver change so that

  • If there are any major changes there will only be a single semver major bump
  • If there are no majors, but any minors there will only be a single semver minor bump
  • If there are no majors, or minors, there will only be a single patch bump

As an example:

If the prior version was 2.0.8 and the incoming release PR had 37 patch feature branches and 4 minor branches the resulting version would be 2.1.0 as that is the minimum semver version bump necessary to imply a minor update.

If the prior version was 2.0.8 and the incoming release PR had 37 patch feature branches, 4 minors and 2 majors the resulting version would be 3.0.0 as that is the minimum semver version bump necessary to imply a major update.

And finally, if the prior version was 2.0.8 and the incoming release PR had 37 patch feature branches, the result version would be 2.0.9 as that is the minimum semver version bump necessary to imply a patch update.

Motivation and Context

Feedback from mithril-core team.

How Has This Been Tested?

  • Unit tests on pr-release to verify increment behaviour in both modes
  • Multiple release cycles on a private repo with the same setting as mithril in the pr.yml and merge.yml files

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

N/A a workflow change only

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated docs/changelog.md

@JAForbes JAForbes added the Area: Workflow For anything dealing with Mithril's internal tooling, including the mocks and bundler, but not ospec label May 13, 2022
@StephanHoyer StephanHoyer merged commit bbf343b into next May 13, 2022
@StephanHoyer StephanHoyer deleted the jf/minimize-semver-change branch May 13, 2022 20:08
@JAForbes JAForbes mentioned this pull request May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Workflow For anything dealing with Mithril's internal tooling, including the mocks and bundler, but not ospec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants