Created
October 5, 2013 19:21
-
-
Save y-matsuwitter/6845060 to your computer and use it in GitHub Desktop.
ビルドからTestflight配信までやるコマンド作った ref: http://qiita.com/y_matsuwitter/items/4fcccb3806499ff5a0be
This file contains 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
#!/bin/sh | |
# applicationの名前 | |
APP="hoge" | |
# SDK | |
SDK="iphoneos7.0" | |
# ビルド時の設定 | |
CONFIGURATION="Release" | |
# 出力先 | |
OUT_DIR="build" | |
# ワークスペース名 | |
WORKSPACE="hoge.xcworkspace" | |
# ワークスペース内のビルド対象スキーム | |
TARGET="hoge" | |
# PROVISIONING FILE | |
PROVISIONING="*****-****-****-****-****" | |
# TESTFLIGHTのAPIトークン | |
TESTFLIGHT_API_TOKEN="your api token" | |
# TESTFLIGHTのAPIトークン | |
TESTFLIGHT_TEAM_TOKEN="your team token" | |
# TESTFLIGHTの配布対象チーム | |
TESTFLIGHT_TEAM="Your distribution team" | |
# ビルドする | |
if [ -a build ]; then | |
echo "Remove existing build dir." | |
rm -R build | |
fi | |
# ビルド | |
xcodebuild -workspace "${WORKSPACE}" -sdk "${SDK}" -configuration "${BUILD_SCHEME}" -scheme "${TARGET}" clean build CONFIGURATION_BUILD_DIR="$(PWD)/${OUT_DIR}" PROVISIONING_PROFILE="${PROVISIONING}" | |
# IPAファイル化 | |
xcrun -sdk "${SDK}" PackageApplication "${OUT_DIR}/${APP}.app" -o "$(PWD)/${OUT_DIR}/${APP}.ipa" --embed "${PROVISIONING}.mobileprovision" | |
# リリースノート作成 | |
vi "${OUT_DIR}/release.txt" | |
# 存在しない場合はとりあえず空ファイル用意しておく | |
if [ ! -f "${OUT_DIR}/release.txt" ]; then | |
touch "${OUT_DIR}/release.txt" | |
fi | |
# テストフライトへ送信 | |
curl http://testflightapp.com/api/builds.json \ | |
-F file="@${OUT_DIR}/${APP}.ipa" \ | |
-F api_token="${TESTFLIGHT_API_TOKEN}" \ | |
-F team_token="${TESTFLIGHT_TEAM_TOKEN}" \ | |
-F notes="@${OUT_DIR}/release.txt" \ | |
-F notify=True \ | |
-F distribution_lists="${TESTFLIGHT_TEAM}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment