Skip to content

Instantly share code, notes, and snippets.

@alexruperez alexruperez/testflight.sh
Last active Feb 3, 2017

Embed
What would you like to do?
A shell script that upload your .ipa file as a build in TestFlight. You just have to set the script variables, place your '<YOUR_PRODUCT_NAME>.ipa' file in the same folder as the script and run it with './testflight.sh'.
#!/bin/bash
PRODUCT_NAME=<YOUR_PRODUCT_NAME>
API_TOKEN=<YOUR_TESTFLIGHT_API_TOKEN>
TEAM_TOKEN=<YOUR_TESTFLIGHT_TEAM_TOKEN>
NOTIFY="True"
NOTES="Build uploaded via the upload API"
if [ "$1" ]
then
NOTES="$1"
fi
if [ ! -f "${PRODUCT_NAME}.ipa" ]
then
echo "${PRODUCT_NAME}.ipa not found!"
else
echo "Uploading to TestFlight..."
/usr/bin/curl "http://testflightapp.com/api/builds.json" \
-F file=@"${PRODUCT_NAME}.ipa" \
-F api_token="${API_TOKEN}" \
-F team_token="${TEAM_TOKEN}" \
-F notify="${NOTIFY}" \
-F replace="True" \
-F notes="${NOTES}"
/usr/bin/open "https://testflightapp.com/dashboard/builds/"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.