Skip to content

Instantly share code, notes, and snippets.

@hamsahmedansari
Created July 10, 2020 10:29
Show Gist options
  • Save hamsahmedansari/ad707ad724289d744683bcb17330cf2d to your computer and use it in GitHub Desktop.
Save hamsahmedansari/ad707ad724289d744683bcb17330cf2d to your computer and use it in GitHub Desktop.
Flat Create APK,IPA and Upload to Server React Native with file.io
#!/bin/bash
# Flat Create APK,IPA and Upload to Server
if [ $1 ]
then
echo $1
if [ $1 == "android" ]
then
echo "building apk"
cd ./android
echo "cleaning apk"
./gradlew clean
echo "cleaning apk done"
echo "building apk"
./gradlew assembleRelease
echo "building apk done"
cd ..
cd ./android/app/build/outputs/apk/release/
echo "uploading apk"
curl -F "file=@./app-release.apk" https://file.io
echo "uploading apk done"
else
echo "building ipa"
fi
else
echo "No Type Provided Please try with android , ios , both "
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment