Skip to content

Instantly share code, notes, and snippets.

@iotashan
Created July 11, 2017 14:55
Show Gist options
  • Save iotashan/23b69fac5c11e3bc4fa306978aeac9c5 to your computer and use it in GitHub Desktop.
Save iotashan/23b69fac5c11e3bc4fa306978aeac9c5 to your computer and use it in GitHub Desktop.
BuddyBuild post build script for uploading source map and dsym to BugSnag
echo "$BUDDYBUILD_BRANCH branch, preparing for BugSnag..."
echo "generating sourcemap"
cd $BUDDYBUILD_WORKSPACE
react-native bundle --platform ios --entry-file index.ios.js --dev false --bundle-output ./ios/main.jsbundle --sourcemap-output ./ios/main.jsbundle.map
echo -e "\n[BugSnag] Uploading sourcemap\n"
curl https://upload.bugsnag.com/ -F apiKey=$BUGSNAG_KEY -F appVersion=$APP_VER -F minifiedUrl="main.jsbundle" -F sourceMap=@$BUDDYBUILD_WORKSPACE/ios/main.jsbundle.map -F minifiedFile=@$BUDDYBUILD_WORKSPACE/ios/main.jsbundle -F overwrite=true -F /workspace/app/index.ios.js=@$BUDDYBUILD_WORKSPACE/index.ios.js
echo -e "\n[BugSnag] Done uploading sourcemap\n"
echo -e "\n[BugSnag] Uploading DSYM\n"
curl https://upload.bugsnag.com/ -F dsym=@"$BUDDYBUILD_PRODUCT_DIR/Release-iphoneos/$APP_NAME.app.dSYM/Contents/Resources/DWARF/$APP_NAME"
echo -e "\n[BugSnag] Done uploading DSYM\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment