From 2b343ca4490b76af2b6cec5fcc863f0d0438641b Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 7 Jun 2024 08:38:04 -0700 Subject: [PATCH] Handle lowercase->uppercase of hermes ios artifacts (#44836) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44836 Sometimes, GHA creates artifacts with lowercase Debug/Release. Make sure that if it happen, we uppercase them. ## Changelog [Internal] - Handle lowercase->uppercase of hermes ios artifacts Reviewed By: cortinico Differential Revision: D58290049 fbshipit-source-id: c1e76e9e5718500378ba08d26d5c4dd0620c78c4 --- .github/workflows/nightly.yml | 9 +++++++++ .github/workflows/test-all.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 43fac3cfd16..44c79f88f91 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -606,6 +606,15 @@ jobs: echo "Could not locate macOS hermesc binary."; exit 1; fi + # Sometimes, GHA creates artifacts with lowercase Debug/Release. Make sure that if it happen, we uppercase them. + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" + fi + + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" + fi + cp -r $HERMES_WS_DIR/win64-bin/* ./packages/react-native/sdks/hermesc/win64-bin/. cp -r $HERMES_WS_DIR/linux64-bin/* ./packages/react-native/sdks/hermesc/linux64-bin/. mkdir -p ./packages/react-native/ReactAndroid/external-artifacts/artifacts/ diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index ccb033d83d5..42c3fb76702 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -725,6 +725,15 @@ jobs: echo "Could not locate macOS hermesc binary."; exit 1; fi + # Sometimes, GHA creates artifacts with lowercase Debug/Release. Make sure that if it happen, we uppercase them. + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" + fi + + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" + fi + cp -r $HERMES_WS_DIR/win64-bin/* ./packages/react-native/sdks/hermesc/win64-bin/. cp -r $HERMES_WS_DIR/linux64-bin/* ./packages/react-native/sdks/hermesc/linux64-bin/. mkdir -p ./packages/react-native/ReactAndroid/external-artifacts/artifacts/