Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/bash
  2. send ()
  3. {
  4. echo "tell application \"Mail\"
  5. activate
  6.  
  7. set MyEmail to make new outgoing message with properties {visible:true, subject:\"EMAIL_SUBJECT\", content:\"Generated release apk\n\"}
  8. tell MyEmail
  9. make new to recipient at end of to recipients with properties {address:\"$1\"}
  10. make new attachment with properties {file name:((\"FILE_PATH\" as POSIX file) as alias)}
  11. end tell
  12. end tell
  13. " | osascript
  14. }
  15.  
  16. 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
  17. cd android/
  18. ./gradlew assembleDebug
  19. ./gradlew assembleRelease
  20.  
  21.  
  22. if [[ "$#" -eq "1" ]]
  23. then
  24. send $1
  25. else
  26. send "example@mail.com"
  27. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement