Skip to content

Commit 9000b04

Browse files
Saadnajmiclaude
andcommitted
fix(ci): use mapped upstream version for Hermes version marker
The version marker was using package.json version but prepareHermesArtifactsAsync resolves via peerDependencies. The mismatch caused the setup step to delete our prebuilt Hermes artifacts and re-download from Maven, which lacks macOS slices in the universal xcframework. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 95e3d7c commit 9000b04

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/microsoft-build-spm.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,13 @@ jobs:
293293
if: steps.cache-slice.outputs.cache-hit != 'true'
294294
working-directory: packages/react-native
295295
run: |
296-
VERSION=$(node -p "require('./package.json').version")
296+
# Use the same version that prepareHermesArtifactsAsync resolves internally
297+
VERSION=$(node --input-type=module -e "
298+
const {findMatchingHermesVersion} = await import('./scripts/ios-prebuild/macosVersionResolver.js');
299+
const {default: {readFileSync}} = await import('fs');
300+
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'));
301+
console.log(findMatchingHermesVersion('./package.json') ?? pkg.version);
302+
")
297303
echo "${VERSION}-Debug" > .build/artifacts/hermes/version.txt
298304
299305
- name: Setup SPM workspace (using prebuilt Hermes)

0 commit comments

Comments
 (0)