Skip to content
Success

Changes

Summary

  1. fix(scripts): keep release.<n> version unchanged in versioning strategy (commit: 0c838c8) (details)
Commit 0c838c8236177c8007cc1688dfc9def165247741 by noreply
fix(scripts): keep release.<n> version unchanged in versioning strategy (#4373)

This pull request updates the versioning strategy logic and its tests to
better handle release versions with pre-release identifiers. The main
change is that versions with a pre-release tag matching the pattern
`release.<number>` are now recognized and handled differently, ensuring
the published version matches the git tag.

Versioning logic improvements:

* Updated `compute` function in `versioning-strategy.ts` to add a check
for pre-release tags matching `release.<number>`, so these versions are
now left unchanged and logged, preventing unnecessary tag or version
changes.

Test updates for versioning behavior:

* Modified test cases in `versioning-strategy.test.ts` to expect the
published version to be `v8.5.4-release.1` instead of `v8.5.4-pre` when
the git version is `v8.5.4-release.1` and the branch is `release-8.5` or
both `master` and `release-8.5`.
[[1]](diffhunk://#diff-9457acf03916f61345de345c9b6d6ec57c0416f5248090b2a7839cbef981f108L60-R60)
[[2]](diffhunk://#diff-9457acf03916f61345de345c9b6d6ec57c0416f5248090b2a7839cbef981f108L70-R69)
(commit: 0c838c8)
The file was modifiedscripts/flow/build/versioning-strategy.ts (diff)
The file was modifiedscripts/flow/build/versioning-strategy.test.ts (diff)