Skip to content

Commit

Permalink
Adjust version parsing in release scripts
Browse files Browse the repository at this point in the history
Summary:
Widen validation checks in version utils to accept `0.x.x` (as opposed to `0.[not-'0'].x`), restoring CI checks on main after D55027120.

Changelog: [Internal]

Differential Revision: D55123739
  • Loading branch information
huntie authored and facebook-github-bot committed Mar 20, 2024
1 parent ce4d8f2 commit d2760a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/releases/utils/version-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@ function validatePrealpha(version /*: Version */) {

function isStableRelease(version /*: Version */) /*: boolean */ {
return (
version.major === '0' && version.minor !== '0' && version.prerelease == null
version.major === '0' &&
version.minor.match(/^\d+$/) &&
version.prerelease == null
);
}

function isStablePrerelease(version /*: Version */) /*: boolean */ {
return !!(
version.major === '0' &&
version.minor !== '0' &&
version.minor.match(/^\d+$/) &&
version.patch.match(/^\d+$/) &&
(version.prerelease?.startsWith('rc.') ||
version.prerelease?.startsWith('rc-') ||
Expand Down

0 comments on commit d2760a7

Please sign in to comment.