Created
July 30, 2014 11:40
-
-
Save lukeredpath/98a0e63e4ef695b17829 to your computer and use it in GitHub Desktop.
My Travis CI iOS deployment/build setup
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
language: objective-c | |
rvm: 2.1.1 | |
install: bundle | |
before_script: ./script/add-key.sh | |
after_script: ./script/remove-key.sh | |
script: ./script/travis.sh | |
env: | |
global: | |
- LANG=en_US.UTF-8 | |
- LC_ALL=en_US.UTF-8 | |
notifications: | |
email: false |
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 | |
security create-keychain -p travis ios-build.keychain | |
security import ./script/certs/apple.cer -k ~/Library/Keychains/ios-build.keychain -T /usr/bin/codesign | |
security import ./script/certs/distribution.p12 -k ~/Library/Keychains/ios-build.keychain -P $KEY_PASSWORD -T /usr/bin/codesign | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
cp ./script/certs/$PROVISIONING_PROFILE_NAME.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ |
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 | |
security delete-keychain ios-build.keychain | |
rm -f ~/Library/MobileDevice/Provisioning\ Profiles/$PROVISIONING_PROFILE_NAME.mobileprovision |
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 | |
echo "Building and running unit tests" | |
rake test | |
if [[ $? != 0 ]]; then | |
echo "Tests failed, exiting." | |
exit 1 | |
fi | |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then | |
echo "This is a pull request. No deployment will be done." | |
exit 0 | |
fi | |
if [[ "$TRAVIS_BRANCH" != "release/beta" ]]; then | |
echo "Testing on a branch other than release/beta. No deployment will be done." | |
exit 0 | |
fi | |
RELEASE_DATE=`date '+%Y-%m-%d %H:%M:%S'` | |
TF_RELEASE_NOTES="Build: $TRAVIS_BUILD_NUMBER\nUploaded: $RELEASE_DATE" | |
# Travis now use Mavericks which requires the keychain is default and unlocked | |
# see: http://docs.travis-ci.com/user/common-build-problems/#Mac%3A-Code-Signing-Errors | |
# Make the keychain the default so identities are found | |
security default-keychain -s ios-build.keychain | |
# Unlock the keychain | |
security unlock-keychain -p travis ios-build.keychain | |
# Set keychain locking timeout to 3600 seconds | |
security set-keychain-settings -t 3600 -u ios-build.keychain | |
echo "Packagaing and deploying build to TestFlight" | |
rake deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you execute xctool to generate the proper IPA? What's rake
deploy