@Author: [email protected]
@Time: 20150605
- Build CocoaPods project in shell.
- Package app in ipa file.
- Generate resources for ITMS service.
- Deploy ITMS files to localhost.
- Archive log files and deploy to localhost.
- Register as Apple Developer, make Private-Key and signed Certificate for develop.
- Generate provisioning profile for develop.
- Install Xcode and Command Line tools on mac.
- Add Developer account in Xcode->preference->accounts and sync the profiles.
- New Xcode project or use any exist projects, copy the
scripts
dir into the$PROJECT_HOME
. - Open terminal,
cd
to$PROJECT_HOME
dir, run the shells likescripts/xxx.sh
.
-
modify paramaters in
run-build.sh
:export PROJECT_NAME=myproject export OEMCONFIG_NAME=myproject
PROJECT_NAME
is used to locate the.xcodeproj
or the.xcworkspace
file in project dir and thescheme
name to build.OEMCONFIG_NAME
is used to bumpInfo.plist
entries before build.bumpinfo.sh
will read the config fromscripts/$OEMCONFIG_NAME-config/Info.plist
file if exists. -
cp
orrename
scripts/myproject-config
dir, modify theInfo.plist
in it to fit your project setting. -
modify paramaters in
run-deploy.sh
or define those in your CI runner's Shell environment:#export DEPLOY_ENDPOINT=https://dl.xxx.xxx #export DEPLOY_LOCAL_DIR=/Users/cirunner/Sites
DEPLOY_LOCAL_DIR
should be set as the web document ROOT dir inapache
ornginx
and enable theIndexes
option. All ITMS resources will be copied to this dir.DEPLOY_ENDPOINT
is used to access the ITMS resources. VisitDEPLOY_ENDPOINT
should be accessed toDEPLOY_LOCAL_DIR
.
Local build for release:
cd $PROJECT_HOME
scripts/run-build.sh -local -release
CI build & deploy for debug:
set -x
env
ls -la
scripts/run-build.sh -ci -debug
RET_CODE=$?
if [ "$RET_CODE" == "0" ]; then
scripts/run-deploy.sh -ci -debug
RET_CODE=$?
fi
scripts/deploy-ci-logs.sh
echo "Job Return:$RET_CODE"
exit $RET_CODE
Due to the Gitlab-CI log limit, xcode build & package output will be directed to log files under $PROJECT_HOME/build/logs/ in CI runner env.
- Code sign failed in non-interactive env like SSH
- gitlab-ci-multi-runner always failed in some env
- Other gitlab-ci-multi-runner issues
- Add feature: uploading ITMS resources to AWS s3.
- Add document for enable SSL service on Mac OSX.