Skip to content

Instantly share code, notes, and snippets.

@rcabamo
Last active December 17, 2015 19:49
Show Gist options
  • Save rcabamo/5663183 to your computer and use it in GitHub Desktop.
Save rcabamo/5663183 to your computer and use it in GitHub Desktop.
Archive and upload ipa
#!/bin/sh
# Requeriments: https://github.com/nomad/shenzhen by @mattt
#constants
MY_USERNAME = "rcabamo"
CONFIGURATION_NAME="Release"
PROJDIR="/Users/${MY_USERNAME}/Develop/iOS/rubis"
APPLICATION_NAME="rubis"
# Compile && Archive
ipa build -c "${CONFIGURATION_NAME}"
# Upload IPA
echo Uploading IPA...
json=$(curl -s -i "https://api.appsendr.com/v1/app/new" -X POST \
-F "identifier=com.rcabamo.rubis" \
-F "app_data=@${APPLICATION_NAME}.ipa" \
-F "icon=@${PROJDIR}/Icon.png")
IPA_URL=$(echo $json | grep -o 'http[s]*:[^"}]*')
echo $IPA_URL | pbcopy
echo $IPA_URL copied to clipboard!
# Cleaning up
rm -rf ${PROJDIR}/build/
rm ${PROJDIR}/${APPLICATION_NAME}.ipa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment