Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- send ()
- {
- echo "tell application \"Mail\"
- activate
- set MyEmail to make new outgoing message with properties {visible:true, subject:\"EMAIL_SUBJECT\", content:\"Generated release apk\n\"}
- tell MyEmail
- make new to recipient at end of to recipients with properties {address:\"$1\"}
- make new attachment with properties {file name:((\"FILE_PATH\" as POSIX file) as alias)}
- end tell
- end tell
- " | osascript
- }
- react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
- cd android/
- ./gradlew assembleDebug
- ./gradlew assembleRelease
- if [[ "$#" -eq "1" ]]
- then
- send $1
- else
- send "example@mail.com"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement