Skip to content

Commit 4f7a930

Browse files
committed
[RN][Release]Fix E2E script when using CI artifacts
1 parent 10b63c1 commit 4f7a930

2 files changed

Lines changed: 13 additions & 50 deletions

File tree

scripts/release-testing/test-e2e-local.js

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ const argv = yargs
4848
coerce: platform => platform.toLowerCase(),
4949
choices: ['ios', 'android'],
5050
})
51-
.option('h', {
52-
alias: 'hermes',
53-
type: 'boolean',
54-
default: true,
55-
})
5651
.option('c', {
5752
alias: 'ciToken',
5853
type: 'string',
@@ -80,9 +75,7 @@ async function testRNTesterIOS(
8075
onReleaseBranch /*: boolean */,
8176
) {
8277
console.info(
83-
`We're going to test the ${
84-
argv.hermes === true ? 'Hermes' : 'JSC'
85-
} version of RNTester iOS with the new Architecture enabled`,
78+
`We're going to test the 'Hermes' version of RNTester iOS with the new Architecture enabled`,
8679
);
8780

8881
// if everything succeeded so far, we can launch Metro and the app
@@ -98,25 +91,15 @@ async function testRNTesterIOS(
9891
'RNTester.app',
9992
);
10093
exec(`rm -rf ${appOutputFolder}`);
101-
if (argv.hermes === true) {
102-
// download hermes App
103-
const hermesAppUrl = await ciArtifacts.artifactURLForHermesRNTesterApp();
104-
const hermesAppZipPath = path.join(
105-
ciArtifacts.baseTmpPath(),
106-
'RNTesterAppHermes.zip',
107-
);
108-
ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath);
109-
exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`);
110-
} else {
111-
// download JSC app
112-
const hermesAppUrl = await ciArtifacts.artifactURLForJSCRNTesterApp();
113-
const hermesAppZipPath = path.join(
114-
ciArtifacts.baseTmpPath(),
115-
'RNTesterAppJSC.zip',
116-
);
117-
ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath);
118-
exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`);
119-
}
94+
95+
// download hermes App
96+
const hermesAppUrl = await ciArtifacts.artifactURLForHermesRNTesterApp();
97+
const hermesAppZipPath = path.join(
98+
ciArtifacts.baseTmpPath(),
99+
'RNTesterAppHermes.zip',
100+
);
101+
ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath);
102+
exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`);
120103

121104
// boot device
122105
const bootedDevice = String(
@@ -135,9 +118,7 @@ async function testRNTesterIOS(
135118
exec('xcrun simctl launch booted com.meta.RNTester.localDevelopment');
136119
} else {
137120
exec(
138-
`USE_HERMES=${
139-
argv.hermes === true ? 1 : 0
140-
} CI=${onReleaseBranch.toString()} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`,
121+
`USE_HERMES=1 CI=${onReleaseBranch.toString()} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`,
141122
);
142123

143124
// launch the app on iOS simulator
@@ -320,26 +301,13 @@ async function testRNTestProject(
320301
'reactNativeArchitectures=arm64-v8a',
321302
'android/gradle.properties',
322303
);
323-
const hermesEnabled = (await argv).hermes === true;
324-
325-
// Update gradle properties to set Hermes as false
326-
if (!hermesEnabled) {
327-
sed(
328-
'-i',
329-
'hermesEnabled=true',
330-
'hermesEnabled=false',
331-
'android/gradle.properties',
332-
);
333-
}
334304

335305
if (argv.platform === 'ios') {
336306
// doing the pod install here so that it's easier to play around RNTestProject
337307
cd('ios');
338308
exec('bundle install');
339309
exec(
340-
`HERMES_ENGINE_TARBALL_PATH=${hermesPath} USE_HERMES=${
341-
hermesEnabled ? 1 : 0
342-
} bundle exec pod install --ansi`,
310+
`HERMES_ENGINE_TARBALL_PATH=${hermesPath} USE_HERMES=1 bundle exec pod install --ansi`,
343311
);
344312

345313
cd('..');

scripts/release-testing/utils/github-actions-utils.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,8 @@ async function artifactURLForRNTesterAPK(
209209
return getArtifactURL('rntester-debug');
210210
}
211211

212-
async function artifactURLForJSCRNTesterApp() /*: Promise<string> */ {
213-
return getArtifactURL('RNTesterApp-NewArch-JSC-Debug');
214-
}
215-
216212
async function artifactURLForHermesRNTesterApp() /*: Promise<string> */ {
217-
return getArtifactURL('RNTesterApp-NewArch-Hermes-Debug');
213+
return getArtifactURL('RNTesterApp-NewArch-Debug');
218214
}
219215

220216
async function artifactURLForMavenLocal() /*: Promise<string> */ {
@@ -249,7 +245,6 @@ module.exports = {
249245
initialize,
250246
downloadArtifact,
251247
artifactURLForRNTesterAPK,
252-
artifactURLForJSCRNTesterApp,
253248
artifactURLForHermesRNTesterApp,
254249
artifactURLForMavenLocal,
255250
artifactURLHermesDebug,

0 commit comments

Comments
 (0)