Skip to content

Commit 837b9b1

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 9207eef commit 837b9b1

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ runs:
3333
if: ${{ inputs.use-hermes-nightly == 'true' }}
3434
shell: bash
3535
run: |
36-
node ./scripts/releases/use-hermes-nightly.js
36+
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
37+
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
38+
node ./scripts/releases/use-hermes-nightly.js
39+
fi
3740
- name: Run yarn install again, with the correct hermes version
3841
if: ${{ inputs.use-hermes-nightly == 'true' }}
3942
uses: ./.github/actions/yarn-install

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ runs:
4141
if: ${{ inputs.use-hermes-nightly == 'true' }}
4242
shell: bash
4343
run: |
44-
node ./scripts/releases/use-hermes-nightly.js
44+
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
45+
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
46+
node ./scripts/releases/use-hermes-nightly.js
47+
fi
4548
- name: Run yarn install again, with the correct hermes version
4649
if: ${{ inputs.use-hermes-nightly == 'true' }}
4750
uses: ./.github/actions/yarn-install

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ jobs:
4949
- name: Set Hermes version
5050
shell: bash
5151
run: |
52-
if [ "${{ inputs.use-hermes-nightly }}" == "true" ]; then
52+
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
53+
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
5354
HERMES_VERSION="nightly"
54-
else
55-
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
5655
fi
5756
echo "Using Hermes version: $HERMES_VERSION"
5857
echo "HERMES_VERSION=$HERMES_VERSION" >> $GITHUB_ENV

0 commit comments

Comments
 (0)