Created
February 11, 2014 15:30
-
-
Save t-kashima/8937091 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# プロジェクトの場所 | |
PROJ_DIR="/Users/kashima/git/TelevisionGuideAuto" | |
# ${PROJ_DIR}/プロジェクトファイルの場所 | |
PROJ_FILE_PATH="app/TelevisionGuide/TelevisionGuide.xcodeproj" | |
# IPAファイルの出力先 | |
OUT_DIR="/Users/kashima/bin/hack_build" | |
# IPAの名前 | |
PRODUCT_NAME="TelevisionGuide" | |
# AdHocビルドの時に使うConfigure | |
CONFIGURATION="AdHoc" | |
# リポジトリを最新に保つ | |
cd ${PROJ_DIR} | |
git reset --hard HEAD | |
GIT_OUTPUT=`git pull origin master` | |
echo $GIT_OUTPUT | |
GIT_OUTPUT_NUM=`echo ${GIT_OUTPUT} | wc -w` | |
if [ $GIT_OUTPUT_NUM -le 2 ]; then | |
echo "This is not exist a pull file." | |
exit | |
fi | |
# Xcodeビルド | |
xcodebuild clean -project "${PROJ_DIR}/${PROJ_FILE_PATH}" | |
xcodebuild -project "${PROJ_DIR}/${PROJ_FILE_PATH}" -configuration "${CONFIGURATION}" install DSTROOT="${OUT_DIR}" | |
BUILD_OUTPUT=`xcrun -sdk iphoneos PackageApplication "${OUT_DIR}/Applications/${PRODUCT_NAME}.app" -o "${OUT_DIR}/${PRODUCT_NAME}.ipa" --sign "iPhone Distribution: Takumi Kashima"` | |
echo $BUILD_OUTPUT | |
if [ "${BUILD_OUTPUT}" != "" ]; then | |
echo "This build is error." | |
exit | |
fi | |
scp "${OUT_IPA_DIR}/${IPA_FILE_NAME}.ipa" hack:/var/www/html/app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment