Skip to content

chore(dev-build): bump patch version for lerna dev builds #24564

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

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

liamdebeasi
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Lerna expects that the version number changes in between releases, even if you are adding a string to the end of the version to make it unique. This means that if you are currently on 6.0.2, then a dev build need to have 6.0.3 (plus whatever unique string you add).

Previously, the lerna.json file had 6.0.0 as the version because we used the old release scripts to release 6.0.1, so lerna.json never got updated. As a result, whenever we tried to do a dev build we released 6.0.1-[dev hash] that passed because lerna looks to lerna.json for the version (which in this case was 6.0.0).

Starting with 6.0.2, we release using the lerna scripts so the version in lerna.json was correctly updated to 6.0.2 resulting in dev builds failing to create due to:

ERR! lerna bump must be an explicit version string _or_ one of: 'major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease', 'from-git', or 'from-package'.

What is the new behavior?

  • Ensures that the dev build uses a newer version that the current version. In this case I made it use the next patch release, so if current version is 6.0.2 the dev build will be 6.0.3-[dev hash]

Does this introduce a breaking change?

  • Yes
  • No

Other information

@liamdebeasi liamdebeasi requested a review from a team January 12, 2022 14:40
@liamdebeasi liamdebeasi merged commit 88602a9 into main Jan 12, 2022
@liamdebeasi liamdebeasi deleted the dev-build-bump branch January 12, 2022 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant