Skip to content

Commit 79a1ca4

Browse files
committed
Use real RCT_SCRIPT_OUTPUT_DIR for generate-codegen-artifacts in script_phases.sh
Avoid ending up in in derive data output folder to be able to discover `autolinking.json` generated in Cocoapods step in all cases, regardless of if the script checks `RCT_SCRIPT_OUTPUT_DIR` itself.
1 parent 8a5a864 commit 79a1ca4

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

packages/react-native/scripts/react_native_pods_utils/script_phases.sh

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@ generateCodegenArtifactsFromSchema () {
9393
popd >/dev/null || exit 1
9494
}
9595

96-
generateArtifacts () {
97-
describe "Generating codegen artifacts"
98-
pushd "$RCT_SCRIPT_RN_DIR" >/dev/null || exit 1
99-
"$NODE_BINARY" "scripts/generate-codegen-artifacts.js" --path "$RCT_SCRIPT_APP_PATH" --outputPath "$TEMP_OUTPUT_DIR" --targetPlatform "ios"
100-
popd >/dev/null || exit 1
101-
}
102-
10396
moveOutputs () {
10497
mkdir -p "$RCT_SCRIPT_OUTPUT_DIR"
10598

@@ -110,22 +103,22 @@ moveOutputs () {
110103
}
111104

112105
withCodegenDiscovery () {
113-
setup_dirs
114-
find_node
115-
find_codegen
116-
generateArtifacts
117-
moveOutputs
106+
describe "Generating codegen artifacts"
107+
pushd "$RCT_SCRIPT_RN_DIR" >/dev/null || exit 1
108+
"$NODE_BINARY" "scripts/generate-codegen-artifacts.js" --path "$RCT_SCRIPT_APP_PATH" --outputPath "$RCT_SCRIPT_OUTPUT_DIR" --targetPlatform "ios"
109+
popd >/dev/null || exit 1
118110
}
119111

120112
noCodegenDiscovery () {
121113
setup_dirs
122114
find_node
123-
find_codegen
124115
generateCodegenSchemaFromJavaScript
125116
generateCodegenArtifactsFromSchema
126117
moveOutputs
127118
}
128119

120+
find_node
121+
find_codegen
129122
if [ "$RCT_SCRIPT_TYPE" = "withCodegenDiscovery" ]; then
130123
withCodegenDiscovery "$@"
131124
else

0 commit comments

Comments
 (0)