Skip to content

Commit c757370

Browse files
committed
Use pinned Hermes version when version.properties is not 1000.0.0
The use-hermes-nightly flag was computed from the branch name, which evaluates incorrectly for PR branches targeting stable. Instead, read the actual HERMES_VERSION_NAME from version.properties and only use nightly when it is the 1000.0.0 development placeholder.
1 parent 0004708 commit c757370

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/actions/test-ios-helloworld/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ runs:
2626
- name: Set nightly Hermes versions
2727
shell: bash
2828
run: |
29-
node ./scripts/releases/use-hermes-nightly.js
29+
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
30+
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
31+
node ./scripts/releases/use-hermes-nightly.js
32+
fi
3033
- name: Run yarn install again, with the correct hermes version
3134
uses: ./.github/actions/yarn-install
3235
- name: Download ReactNativeDependencies

.github/actions/test-ios-rntester/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ runs:
3535
- name: Set nightly Hermes versions
3636
shell: bash
3737
run: |
38-
node ./scripts/releases/use-hermes-nightly.js
38+
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
39+
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
40+
node ./scripts/releases/use-hermes-nightly.js
41+
fi
3942
- name: Run yarn install again, with the correct hermes version
4043
uses: ./.github/actions/yarn-install
4144
- name: Prepare IOS Tests

.github/workflows/prebuild-ios-core.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ jobs:
4747
- name: Set Hermes version
4848
shell: bash
4949
run: |
50-
if [ "${{ inputs.use-hermes-nightly }}" == "true" ]; then
51-
# We are not publishing nightly versions of Hermes V1 yet.
52-
# For now, we can use the latest version of Hermes V1 published on maven and npm.
50+
HERMES_VERSION=$(sed -n 's/^HERMES_V1_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
51+
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
5352
HERMES_VERSION="latest-v1"
54-
else
55-
HERMES_VERSION=$(sed -n 's/^HERMES_V1_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
5653
fi
5754
echo "Using Hermes version: $HERMES_VERSION"
5855
echo "HERMES_VERSION=$HERMES_VERSION" >> $GITHUB_ENV

0 commit comments

Comments
 (0)