Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automated releasing iOS app with Travis CI

Automated releasing iOS app with Travis CI

How to automate releasing iOS app with Travis CI

Kishikawa Katsumi

September 17, 2014
Tweet

More Decks by Kishikawa Katsumi

Other Decks in Programming

Transcript

  1. language: objective-c cache: directories: - vendor/bundle - Pods install: -

    bundle install --path=vendor/bundle --binstubs=vendor/bin - bundle exec pod install script: - bundle exec rake ACTION after_success: - 'bundle exec travis-artifacts upload --path Ubiregi2.xcarchive.zip --target-path' env: global: - LANG=en_US.UTF-8 - LC_ALL=en_US.UTF-8 matrix: - ACTION="profile:install certificate:add distribute:CONFIG certificate:remove" - ACTION=test
  2. $ bundle exec rake -T rake archive # Build artifacts

    (.xcarchive, ipa) (Release) rake build # Build application (Release)e) rake clean # Remove any temporary products rake distribute # Upload IPA file to TestFlight (Release)rake profile:download # Download provisioning profiles from ADC rake release # Submit application rake setup # Setting up a development environment rake test # Test application rake version # Print the current version rake version:bump:major # Bump major version (X.00) rake version:bump:minor # Bump minor version (0.XX) rake version:bump:release # Bump release version (0.XY) rake version:current # Print the current version rake version:set_build_version # Sets build version to last git commit
  3. $ bundle exec rake -T rake archive # Build artifacts

    (.xcarchive, ipa) (Release) rake build # Build application (Release)e) rake clean # Remove any temporary products rake distribute # Upload IPA file to TestFlight (Release)rake profile:download # Download provisioning profiles from ADC rake release # Submit application rake setup # Setting up a development environment rake test # Test application rake version # Print the current version rake version:bump:major # Bump major version (X.00) rake version:bump:minor # Bump minor version (0.XX) rake version:bump:release # Bump release version (0.XY) rake version:current # Print the current version rake version:set_build_version # Sets build version to last git commit
  4. task distribute: ["distribute:release"] ! namespace :distribute do task :release =>

    ["archive:release"] do distribute end ! task :adhoc => ["version:set_build_version", "archive:adhoc"] do distribute end end
  5. xcodebuild -sdk “iphoneos" -workspace “Ubiregi2.xcworkspace" -scheme “Ubiregi2-Release" -configuration “Release" CONFIGURATION_BUILD_DIR=“build"

    CONFIGURATION_TEMP_DIR=“build/temp" CODE_SIGN_IDENTITY="iPhone Distribution: Ubiregi Inc. (A1234567XZ)” archive -archivePath "build/Ubiregi2.xcarchive" #VJMEYDBSDIJWF
  6. def zip_dsyms sh "(cd #{BUILD_DIR}; zip -ryq #{APP_NAME}.app.dSYM.zip #{APP_NAME}.app.dSYM)" sh

    "mv #{DSYM_FILE} #{BUILD_DIR}/#{APP_NAME}.xcarchive/dSYMs/#{APP_NAME}.app.dSYM" ! sh "(cd #{BUILD_DIR}; zip -ryq #{APP_NAME}.xcarchive.zip #{APP_NAME}.xcarchive)" end ;JQE4:. %FCVH4ZNCPM'JMF
  7. task distribute: ["distribute:release"] ! namespace :distribute do task :release =>

    ["archive:release"] do distribute end ! task :adhoc => ["version:set_build_version", "archive:adhoc"] do distribute end end 6QMPBEFBDIpMFT
  8. def crittercism options = { dsym: "@#{DSYM_ZIP_FILE}", key: API_KEY, }

    upload_form("https://api.crittercism.com/api_beta/dsym/#{APP_ID}", options) end ! def testflight options = { file: "@#{IPA_FILE}", api_token: API_TOKEN, team_token: TEAM_TOKEN, notify: true, replace: true, distribution_lists: pull_request? ? "Dev" : "Internal", notes: release_notes, } upload_form("http://testflightapp.com/api/builds.json", options) end