Skip to content

Commit 903c4a9

Browse files
Saadnajmiclaude
andcommitted
fix(ci): use mapped upstream version for Hermes version marker
The version marker was using package.json version (e.g. 0.81.7) but prepareHermesArtifactsAsync resolves via peerDependencies (e.g. 0.81.6). 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 49b7a90 commit 903c4a9

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
@@ -244,7 +244,13 @@ jobs:
244244
- name: Create Hermes version marker
245245
working-directory: packages/react-native
246246
run: |
247-
VERSION=$(node -p "require('./package.json').version")
247+
# Use the same version that prepareHermesArtifactsAsync resolves internally
248+
VERSION=$(node --input-type=module -e "
249+
const {findMatchingHermesVersion} = await import('./scripts/ios-prebuild/macosVersionResolver.js');
250+
const {default: {readFileSync}} = await import('fs');
251+
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'));
252+
console.log(findMatchingHermesVersion('./package.json') ?? pkg.version);
253+
")
248254
echo "${VERSION}-Debug" > .build/artifacts/hermes/version.txt
249255
250256
- name: Setup SPM workspace (using prebuilt Hermes)

0 commit comments

Comments
 (0)