mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
Fix new release workflow script (#43530)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43530 Fixes and changes following D54956345, encountered during the release process for 0.74 RC4 today. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D55017872 fbshipit-source-id: 616b387088db00c6f076f4571b4ab1541467361c
This commit is contained in:
parent
6dd0cc99f8
commit
a87fb56ef5
@ -1142,18 +1142,12 @@ jobs:
|
||||
name: Versioning react-native package
|
||||
command: |
|
||||
node scripts/releases/set-rn-version.js -v "<< parameters.version >>" --build-type "release"
|
||||
- run:
|
||||
name: Updating RNTester Podfile.lock
|
||||
command: |
|
||||
cd packages/rn-tester/
|
||||
bundle install
|
||||
bundle exec pod install
|
||||
- run:
|
||||
name: Creating release commit
|
||||
command: |
|
||||
git commit -a -m "Release << parameters.version >>\n\n#publish-packages-to-npm&<< parameters.tag >>"
|
||||
git commit -a -m "Release << parameters.version >>" -m "#publish-packages-to-npm&<< parameters.tag >>"
|
||||
git tag -a "v<< parameters.version >>" -m "v<< parameters.version >>"
|
||||
git show HEAD
|
||||
GIT_PAGER=cat git show HEAD
|
||||
- when:
|
||||
condition:
|
||||
equal: ["latest", << parameters.tag >>]
|
||||
|
@ -133,8 +133,8 @@ async function exitIfUnreleasedPackages() {
|
||||
* value will be used instead, setting all packages to a single version.
|
||||
*/
|
||||
async function getNextMonorepoPackagesVersion() /*: Promise<string | null> */ {
|
||||
// Based on @react-native/dev-middleware@0.74.5
|
||||
const _0_74_MIN_PATCH = 6;
|
||||
// Based on last publish before this strategy
|
||||
const _0_74_MIN_PATCH = 75;
|
||||
|
||||
const packages = await getPackages({
|
||||
includeReactNative: false,
|
||||
@ -149,8 +149,8 @@ async function getNextMonorepoPackagesVersion() /*: Promise<string | null> */ {
|
||||
return null;
|
||||
}
|
||||
|
||||
const {minor} = parseVersion(version, 'release');
|
||||
patchVersion = Math.max(patchVersion, parseInt(minor, 10) + 1);
|
||||
const {patch} = parseVersion(version, 'release');
|
||||
patchVersion = Math.max(patchVersion, parseInt(patch, 10) + 1);
|
||||
}
|
||||
|
||||
return '0.74.' + patchVersion;
|
||||
@ -185,7 +185,7 @@ async function main() {
|
||||
}
|
||||
|
||||
// $FlowFixMe[prop-missing]
|
||||
const useNewWorkflow: boolean = argv.useNewWorkflow;
|
||||
const useNewWorkflow /*: boolean */ = argv.useNewWorkflow;
|
||||
|
||||
// now check for unreleased packages
|
||||
if (!useNewWorkflow) {
|
||||
@ -258,11 +258,6 @@ async function main() {
|
||||
|
||||
const parameters = useNewWorkflow
|
||||
? {
|
||||
release_version: version,
|
||||
release_latest: latest,
|
||||
run_release_workflow: true,
|
||||
}
|
||||
: {
|
||||
run_new_release_workflow: true,
|
||||
release_version: version,
|
||||
release_tag: npmTag,
|
||||
@ -270,6 +265,11 @@ async function main() {
|
||||
release_monorepo_packages_version: nextMonorepoPackagesVersion,
|
||||
// $FlowFixMe[prop-missing]
|
||||
release_dry_run: argv.dryRun,
|
||||
}
|
||||
: {
|
||||
release_version: version,
|
||||
release_latest: latest,
|
||||
run_release_workflow: true,
|
||||
};
|
||||
|
||||
const options = {
|
||||
|
Loading…
Reference in New Issue
Block a user