Created
March 19, 2018 09:16
-
-
Save phannam1412/141a09a31d81b2e1562f77268fe6e8c8 to your computer and use it in GitHub Desktop.
React Native - Auto build and upload apk to your server
This file contains hidden or 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
#!/usr/bin/env bash | |
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/ | |
cd android | |
./gradlew assembleDebug | |
cd .. | |
cp android/app/build/outputs/apk/debug/app-debug.apk app-debug.apk | |
# FTP upload file | |
HOST='your-host.com' | |
USER='your-username' | |
PASSWD='your-password' | |
ftp -n -v $HOST << EOT | |
ascii | |
user $USER $PASSWD | |
prompt | |
cd your-destination-directory-on-server | |
put app-debug.apk | |
ls -la | |
bye | |
EOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment