Skip to content

Commit fd1e57b

Browse files
chrfalchfacebook-github-bot
authored andcommitted
moved resources to correct location (facebook#50101)
Summary: In the final XCFramework we no longer need to place resource bundles in a subfolder called Resources - they should be located directly in the framework folder. This commit fixes this by removing copying to the Resources folder. I also removed a few unneeded tests since we know that we are in a valid folder at this point. bypass-github-export-checks ## Changelog: [INTERNAL] - Moved resource bundles up one level Pull Request resolved: facebook#50101 Test Plan: Run RNTester with RCT_USE_RN_DEP=1 and verify that it launches Reviewed By: cortinico Differential Revision: D71464608 Pulled By: cipolleschi fbshipit-source-id: 6cfdda0c6785ffeb13c170f9fd2dd9f5b889d490
1 parent df30038 commit fd1e57b

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

.github/workflows/prebuild-ios.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/cache/restore@v4
1919
with:
2020
path: packages/react-native/third-party/
21-
key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
21+
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
2222
enableCrossOsArchive: true
2323
- name: Yarn Install
2424
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/cache/save@v4
4141
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
4242
with:
43-
key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
43+
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
4444
enableCrossOsArchive: true
4545
path: packages/react-native/third-party/
4646

@@ -74,7 +74,7 @@ jobs:
7474
uses: actions/cache/restore@v4
7575
with:
7676
path: packages/react-native/third-party/.build/Build/Products
77-
key: v1-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
77+
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
7878
- name: Yarn Install
7979
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
8080
uses: ./.github/actions/yarn-install
@@ -107,7 +107,7 @@ jobs:
107107
uses: actions/cache/save@v4
108108
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
109109
with:
110-
key: v1-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
110+
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
111111
enableCrossOsArchive: true
112112
path: |
113113
packages/react-native/third-party/.build/Build/Products
@@ -138,7 +138,7 @@ jobs:
138138
with:
139139
path: |
140140
packages/react-native/third-party/
141-
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
141+
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
142142
# If cache hit, we already have our binary. We don't need to do anything.
143143
- name: Yarn Install
144144
if: steps.restore-xcframework.outputs.cache-hit != 'true'
@@ -199,4 +199,4 @@ jobs:
199199
path: |
200200
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
201201
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
202-
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
202+
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}

scripts/releases/ios-prebuild/compose-framework.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,10 @@ function copyBundles(
149149
const targetBundlePath = path.join(
150150
targetArchFolder,
151151
`${scheme}.framework`,
152-
'Resources',
153152
bundleName,
154153
);
155-
if (
156-
!fs.existsSync(path.join(targetArchFolder, `${scheme}.framework`))
157-
) {
158-
console.warn("Target Bundle path doesn't exist", targetBundlePath);
159-
}
160-
if (!fs.existsSync(path.dirname(sourceBundlePath))) {
161-
console.warn("Source bundle doesn't exist", sourceBundlePath);
162-
}
154+
163155
// A bundle is a directory, so we need to copy the whole directory
164-
execSync(`mkdir -p "${targetBundlePath}"`);
165156
execSync(`cp -r "${sourceBundlePath}/" "${targetBundlePath}"`);
166157
});
167158
} else {

0 commit comments

Comments
 (0)