Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix release build error due to a casing issue in hermes tarball path …
…after download prebuilt tarball (#42160) Summary: In my mac, I use a case-sensitive volume and when I build a react-native 0.73 project it failed with an error that can't find the hermes release tarball to extract: ``` Node found at: /usr/local/bin/node Preparing the final location Extracting the tarball tar: Error opening archive: Failed to open '/Volumes/Workspace/meet-art-link/ios/Pods/hermes-engine-artifacts/hermes-ios-0.73.1-Release.tar.gz' ``` Note the `...-Release.tar.gz` in the error. In the disk it's `...-release.tar.gz`. The build fails in after download the release tarball in release mode because the hermes tarball name in the `replace_hermes_version.js` build script is capitalized, while the file is lowercase on disk. The fix is to ensure the hermes tarball name's "build type" is lowercase just like the function that creates the tarballs in react-native release located in `hermes_utils.js` in `getHermesPrebuiltArtifactsTarballName()`. Perhaps it's better to retrieve the tarball name from the same method it's generated? E.g.: ```js const { getHermesPrebuiltArtifactsTarballName } = require('react-native/scripts/hermes/hermes-utils'); const tarballName = getHermesPrebuiltArtifactsTarballName(`${version}-${configuration}`); const tarballURLPath = `${podsRoot}/hermes-engine-artifacts/${tarballName}`; ``` If yes, let me know to update the PR. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [iOS][Fixed] - Fix release build error due to a casing issue in hermes tarball path after download prebuilt tarball Pull Request resolved: #42160 Test Plan: Use a case sensitive volume or system and build react-native 0.73 in release mode, it will fail. Apply the patch in this PR and it will work fine. Reviewed By: cortinico Differential Revision: D52603439 Pulled By: cipolleschi fbshipit-source-id: 41ed8d8202874f338e4aa3af88d9d28ec1b8b3d5
- Loading branch information