Cocos2d-xのプロジェクトをビルドしてTestFlightにアップロード(Android)

Cocos2d-xのプログラムをAndroid向けにビルドしてTestFlightにアップロードするスクリプトです。
create_project.pyで作成したプロジェクトの直下にスクリプトを置いているものとします。
違う場所に置く場合などはパスの変更が必要です。

#!/bin/sh

# configuration(Debug or Release)
CONFIGURATION="Debug"

# android project directory name
PROJ_ANDROID="proj.android/"
# output apk filename
APK_FILE_NAME="bin/TestApp-${CONFIGURATION}.apk"
# distribution lists
DISTRIBUTION_LISTS="TestersDistributionList"
# Message (notes)
# use NOTES variable
# Notify
NOTIFY=True

# TestFlight
# api token
API_TOKEN="XXXXXXX"
# team token
TEAM_TOKEN="XXXXXXXXXX"


## core script ##

cd ${PROJ_ANDROID}
./build_native.sh
ant debug

#TestFlight upload API
curl http://testflightapp.com/api/builds.json \
     -F file=@$APK_FILE_NAME \
     -F api_token="$API_TOKEN" \
     -F team_token="$TEAM_TOKEN" \
     -F notes="$NOTES" \
     -F notify="$NOTIFY" \
     -F distribution_lists="$DISTRIBUTION_LISTS"