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

The getPackagesToRelease() util picks wrong version when using pre-releases #10583

Closed
pomek opened this issue Sep 23, 2021 · 0 comments · Fixed by ckeditor/ckeditor5-dev#728
Closed
Assignees
Labels
package:dev squad:platform Issue to be handled by the Platform team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@pomek
Copy link
Member

pomek commented Sep 23, 2021

📝 Provide detailed reproduction steps (if any)

To avoid going into details on how release tools work, it's enough to say that new versions are retrieved from the changelog. Hence, the release starts with preparing the changelog, then publishing packages.

Let's consider the following changelog:

Changelog
=========

## [1.0.0.alpha.1](URL) (2021-09-23)

Internal changes only (updated dependencies, documentation, etc.).

### Released packages

<details>
<summary>Released packages (summary)</summary>

New packages:

* [ckeditor5-foo](*): v1.0.0.alpha.1
* ...
</details>

When executing a task for bumping versions, invalid versions are suggested for packages in a mono-repository (packages/*).

✔️ Expected result

The pre-release suffix should be picked properly.

? Packages and their old and new versions:
  * "ckeditor5-foo": v0.0.1 => v1.0.0.alpha.1

❌ Actual result

Unfortunately, only MAJOR.MINOR.PATCH parts are read.

? Packages and their old and new versions:
  * "ckeditor5-foo": v0.0.1 => v1.0.0

❓ Possible solution

https://github.com/ckeditor/ckeditor5-dev/blob/079033487ae1ffa98be9e6969a5a1b115439b71d/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagestorelease.js#L80-L92

Created RegExp picks only numbers and dots. Allowing for letters resolves the problem.

@pomek pomek added type:bug This issue reports a buggy (incorrect) behavior. squad:platform Issue to be handled by the Platform team. package:dev labels Sep 23, 2021
@pomek pomek added this to the iteration 48 milestone Sep 23, 2021
@pomek pomek self-assigned this Sep 23, 2021
@pomek pomek modified the milestones: iteration 48, iteration 47 Sep 23, 2021
pomek added a commit to ckeditor/ckeditor5-dev that referenced this issue Sep 23, 2021
Fix: The `getPackagesToRelease()` function handles pre-release versions properly. Closes ckeditor/ckeditor5#10583.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:dev squad:platform Issue to be handled by the Platform team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant