mirror of https://github.com/status-im/metro.git
Check bundle file exists for release builds
Summary: Motivation: While testing the RC, the bundle step failed (because the reset-cache true flag was still present) for an Archive build causing an app to be distributed without the JS bundle. This was obviously not great because the app just crashed on startup. This fix just checks that the bundle file is present and if not fails the build, as you would expect it to. Closes https://github.com/facebook/react-native/pull/9284 Differential Revision: D3749572 fbshipit-source-id: f1ccb8b6cd0b78f6d8267e7b4b0f10b4a3cec5a1
This commit is contained in:
parent
599aaead28
commit
053720b66f
|
@ -80,10 +80,18 @@ if [[ "$CONFIGURATION" = "Debug" && "$PLATFORM_NAME" != "iphonesimulator" ]]; th
|
|||
echo "$IP.xip.io" > "$DEST/ip.txt"
|
||||
fi
|
||||
|
||||
BUNDLE_FILE="$DEST/main.jsbundle"
|
||||
|
||||
$NODE_BINARY "$REACT_NATIVE_DIR/local-cli/cli.js" bundle \
|
||||
--entry-file "$ENTRY_FILE" \
|
||||
--platform ios \
|
||||
--dev $DEV \
|
||||
--reset-cache \
|
||||
--bundle-output "$DEST/main.jsbundle" \
|
||||
--bundle-output "$BUNDLE_FILE" \
|
||||
--assets-dest "$DEST"
|
||||
|
||||
if [[ ! $DEV && ! -f "$BUNDLE_FILE" ]]; then
|
||||
echo "error: File $BUNDLE_FILE does not exist. This must be a bug with" >&2
|
||||
echo "React Native, please report it here: https://github.com/facebook/react-native/issues"
|
||||
exit 2
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue