Skip to content

Commit e057167

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 9ce2a0f commit e057167

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
@@ -257,7 +257,13 @@ jobs:
257257
if: steps.cache-slice.outputs.cache-hit != 'true'
258258
working-directory: packages/react-native
259259
run: |
260-
VERSION=$(node -p "require('./package.json').version")
260+
# Use the same version that prepareHermesArtifactsAsync resolves internally
261+
VERSION=$(node --input-type=module -e "
262+
const {findMatchingHermesVersion} = await import('./scripts/ios-prebuild/macosVersionResolver.js');
263+
const {default: {readFileSync}} = await import('fs');
264+
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'));
265+
console.log(findMatchingHermesVersion('./package.json') ?? pkg.version);
266+
")
261267
echo "${VERSION}-Debug" > .build/artifacts/hermes/version.txt
262268
263269
- name: Setup SPM workspace (using prebuilt Hermes)

0 commit comments

Comments
 (0)