Created
November 26, 2013 06:53
-
-
Save hidekuro/7654368 to your computer and use it in GitHub Desktop.
ryo_abe氏作、Archive作業を自動化するシェルスクリプト。
http://d.hatena.ne.jp/ryo_abe/20120226/1330242142
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 | |
#SDK | |
SDK="iphoneos5.0" | |
# コンフィグレーション(「Debug」、「Release」、「Ad hoc」) | |
CONFIGURATION="Release" | |
# Xcodeのプロジェクト名 | |
PROJ_FILE_PATH="hoge.xcodeproj" | |
# ターゲット名 | |
TARGET_NAME="hogeTarget" | |
#「Build Settings」にある、プロダクト名 | |
PRODUCT_NAME="hogeProduct" | |
# app出力先ディレクトリ名 | |
OUT_APP_DIR="out_app" | |
# 出力先ipaディレクトリ名 | |
OUT_IPA_DIR="out_ipa" | |
# 出力されるipaファイル名 | |
IPA_FILE_NAME="hogeIpa" | |
# ライセンス取得時の開発者名 | |
DEVELOPPER_NAME="iPhone Distribution: hoge Developper" | |
# アプリのプロビジョニングファイルのパス | |
PROVISIONING_PATH="${HOME}/Library/MobileDevice/Provisioning\ Profiles/hoge.mobileprovision" | |
# 出力先ipaディレクトリ作成 | |
# ------------------------- | |
if [ ! -d ${OUT_IPA_DIR} ]; then | |
mkdir "${OUT_IPA_DIR}" | |
fi | |
# クリーン | |
# ------------------------- | |
xcodebuild clean -project "${PROJ_FILE_PATH}" | |
# ビルド | |
# ------------------------- | |
xcodebuild -project "${PROJ_FILE_PATH}" -sdk "${SDK}" -configuration "${CONFIGURATION}" -target "${TARGET_NAME}" install DSTROOT="${OUT_APP_DIR}" | |
# Create ipa File | |
# ------------------------- | |
xcrun -sdk "${SDK}" PackageApplication "${PWD}/${OUT_APP_DIR}/Applications/${PRODUCT_NAME}.app" -o "${PWD}/${OUT_IPA_DIR}/${IPA_FILE_NAME}.ipa" -embed "${PROVISIONING_PATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment