Fix hermes-utils.js building from source when on the release branch

This commit is contained in:
Nicola Corti
2022-05-30 14:57:14 +01:00
parent a72d1960ff
commit 659b693fcd
+7 -1
View File
@@ -158,9 +158,15 @@ function copyPodSpec() {
);
}
function isOnAReleaseBranch() {
let currentBranch = execSync(`git rev-parse --abbrev-ref HEAD`).toString().trim();
let currentRemote = execSync(`git config --get remote.origin.url`).toString().trim();
return currentBranch.endsWith('-stable') && currentRemote.endsWith('facebook/react-native.git');
}
function shouldBuildHermesFromSource() {
const hermesTag = readHermesTag();
return hermesTag === DEFAULT_HERMES_TAG;
return isOnAReleaseBranch() || hermesTag === DEFAULT_HERMES_TAG;
}
function shouldUsePrebuiltHermesC(os) {