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

Fix RNTester Podfile.lock update in release workflow #43513

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions scripts/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,19 @@ const REACT_NATIVE_PACKAGE_DIR /*: string */ = path.join(
'react-native',
);

/**
* The absolute path to the rn-tester package.
*/
const RN_TESTER_DIR /*: string */ = path.join(
REPO_ROOT,
'packages',
'rn-tester',
);

module.exports = {
PACKAGES_DIR,
REACT_NATIVE_PACKAGE_DIR,
REPO_ROOT,
RN_TESTER_DIR,
SCRIPTS_DIR,
};
22 changes: 17 additions & 5 deletions scripts/releases-ci/prepare-package-for-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

'use strict';

const {RN_TESTER_DIR} = require('../consts');
const {setReactNativeVersion} = require('../releases/set-rn-version');
const {failIfTagExists} = require('../releases/utils/release-utils');
const {
isReleaseBranch,
parseVersion,
} = require('../releases/utils/version-utils');
const {execSync} = require('child_process');
const {echo, exec, exit} = require('shelljs');
const yargs = require('yargs');

Expand Down Expand Up @@ -95,11 +97,21 @@ async function main() {
}

// Release builds should commit the version bumps, and create tags.
echo('Updating RNTester Podfile.lock...');
if (exec('source scripts/update_podfile_lock.sh && update_pods').code) {
echo('Failed to update RNTester Podfile.lock.');
echo('Fix the issue, revert and try again.');
exit(1);
try {
console.log('Updating RNTester Podfile.lock');
execSync(
`
bundle install;
bundle exec pod install;
`,
{cwd: RN_TESTER_DIR, stdio: 'inherit'},
);
} catch (e) {
console.error('Failed to update RNTester Podfile.lock.');
console.error('Fix the issue, revert and try again.');

process.exitCode = 1;
return;
}

echo(`Local checkout has been prepared for release version ${version}.`);
Expand Down
27 changes: 0 additions & 27 deletions scripts/update_podfile_lock.sh

This file was deleted.

Loading