Skip to content

Commit 70281d6

Browse files
alanjhughesmeta-codesync[bot]
authored andcommitted
Skip use-hermes-nightly when hermes-compiler is already pinned (#56505)
Summary: `use-hermes-nightly` unconditionally overwrites the `hermes-compiler` with whatever the `latest-v1` tag currently points to. On release branches, where `hermes-compiler` is pinned to a specific version, it replaces the pin. This doesn't cause an issue until the `latest-v1` tag moves off the pinned version. Looks to have been introduced by #53837. bypass-github-export-checks ## Changelog: [INTERNAL] [FIXED] - Preserve pinned `hermes-compiler` version when running `use-hermes-nightly` on release branches. Pull Request resolved: #56505 Test Plan: With `hermes-compiler` manually set to a real version, the script returns early without modifying `package.json` or `hermes-engine/version.properties`. Reviewed By: cortinico Differential Revision: D101633376 Pulled By: cipolleschi fbshipit-source-id: 666baa1a7838272b18e326b8597394d66b81343c
1 parent fd082b9 commit 70281d6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

scripts/releases/use-hermes-nightly.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@
1010

1111
'use strict';
1212

13+
const {getReactNativePackage} = require('../shared/monorepoUtils');
1314
const {updateHermesVersionsToNightly} = require('./utils/hermes-utils');
1415

1516
async function main() {
17+
const {packageJson} = await getReactNativePackage();
18+
const hermesCompilerVersion = packageJson.dependencies?.['hermes-compiler'];
19+
20+
if (hermesCompilerVersion != null && hermesCompilerVersion !== '0.0.0') {
21+
console.log(
22+
`Skipping hermes nightly update: hermes-compiler is pinned to ${hermesCompilerVersion}`,
23+
);
24+
return;
25+
}
26+
1627
await updateHermesVersionsToNightly();
1728
}
1829

0 commit comments

Comments
 (0)