Created
February 19, 2016 23:45
-
-
Save richardgill/4f9d7de758e8e57c1e26 to your computer and use it in GitHub Desktop.
Attempt to make apphub build.zip with rnws instead of default react-native bundle.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
ROOT_DIR=$DIR/.. | |
PLIST_FILE="$ROOT_DIR/iOS/Info.plist" | |
TMP_DIR="/tmp/apphub/$(uuidgen)/" | |
BUNDLE_DIR_NAME="ios.bundle" | |
BUNDLE_DIR="$TMP_DIR$BUNDLE_DIR_NAME" | |
ZIP_NAME="build.zip" | |
OUTPUT_ZIP="$TMP_DIR$ZIP_NAME" | |
BUNDLE_NAME="main.jsbundle" | |
BUNDLE_PATH="$BUNDLE_DIR/$BUNDLE_NAME" | |
echo -e "PLIST_FILE: $PLIST_FILE" | |
echo -e "TMP_DIR: $TMP_DIR" | |
echo -e "OUTPUT_ZIP: $OUTPUT_ZIP" | |
echo -e "BUNDLE_PATH: $BUNDLE_PATH" | |
echo -e "BUNDLE_DIR: $BUNDLE_DIR" | |
mkdir -p $TMP_DIR && \ | |
node_modules/.bin/rnws bundle --no-android --iosBundlePath $BUNDLE_PATH && \ | |
cp $PLIST_FILE "$BUNDLE_DIR/" && \ | |
cd $TMP_DIR && \ | |
zip -r $OUTPUT_ZIP $BUNDLE_DIR_NAME && \ | |
curl -X PUT \ | |
-H "X-AppHub-Application-ID: Q65uf8QD1eVS3P4JMlUA" \ | |
-H "X-AppHub-Application-Secret: zlrf2U9ytJR7LRkMWhfsaDVNzVWXcAKn35TrRBIq" \ | |
-H 'X-AppHub-Build-Metadata: { | |
"target": "debug" | |
}' \ | |
-H "Content-Type: application/zip" \ | |
-L https://api.apphub.io/v1/upload \ | |
--upload-file $OUTPUT_ZIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment