Skip to content

Commit 7f96502

Browse files
committed
fix: brownie CLI iOS - pass packageDir to Rock helpers and use .brownie folder as output base
1 parent ee88f55 commit 7f96502

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

apps/RNApp/ios/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
out
1+
.brownie

packages/cli/src/brownfield/commands/packageIos.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ export const packageIosCommand = curryOptions(
4040
throw new Error('iOS Xcode project not found in the configuration.');
4141
}
4242

43-
options.buildFolder ??= path.join(
43+
const brownieCacheDir = path.join(
4444
userConfig.project.ios.sourceDir,
45-
'build' // default build folder in iOS project layout
45+
'.brownie'
4646
);
4747

48+
options.buildFolder ??= path.join(brownieCacheDir, 'build');
49+
4850
packageIosAction(
4951
options,
5052
{
@@ -55,12 +57,7 @@ export const packageIosCommand = curryOptions(
5557
// therefore we resolve it manually from RN's package.json using Rock's utils
5658
reactNativeVersion: getReactNativeVersion(projectRoot),
5759
usePrebuiltRNCore: 0, // for brownfield, it is required to build RN from source
58-
// below: RN CLI config detection in Rock depends on the existence of a Rock config file;
59-
// the below is an escape hatch to provide the config manually and escape Rock's config-dependent logic
60-
iosConfigOverride: {
61-
sourceDir: userConfig.project.ios.sourceDir,
62-
xcodeProject: userConfig.project.ios.xcodeProject,
63-
},
60+
packageDir: path.join(brownieCacheDir, 'package'), // the output directory for artifacts
6461
skipCache: true, // cache is dependent on existence of Rock config file
6562
},
6663
platformConfig

0 commit comments

Comments
 (0)