Skip to content
Browse files

Check bundle file exists for release builds

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 #9284

Differential Revision: D3749572

fbshipit-source-id: f1ccb8b6cd0b78f6d8267e7b4b0f10b4a3cec5a1
  • Loading branch information...
alexanderjarvis authored and Facebook Github Bot 4 committed Aug 21, 2016
1 parent 004135a commit ea7b2ef36b1a0b141c4b64d0ab5d6d3a94be14a4
Showing with 9 additions and 1 deletion.
  1. +9 −1 packager/
@@ -80,10 +80,18 @@ if [[ "$CONFIGURATION" = "Debug" && "$PLATFORM_NAME" != "iphonesimulator" ]]; th
echo "$" > "$DEST/ip.txt"


$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:"
exit 2

0 comments on commit ea7b2ef

Please sign in to comment.
You can’t perform that action at this time.