diff --git a/.travis.yml b/.travis.yml index 7e292a4..0a83b44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,13 @@ language: objective-c +osx_image: xcode9.4 branches: only: - develop before_install: - - echo -e "machine github.com\n login $GITHUB_ACCESS_TOKEN" >> ~/.netrc + - echo -e "machine github.com\n login $GITHUB_ACCESS_TOKEN" >> ~/.netrc +install: + - gem update fastlane + - gem install xcodeproj script: - - ./fastlane/travis.sh + - fastlane test + - if [ "$TRAVIS_EVENT_TYPE" = "push" ]; then fastlane beta; fi diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0077d67..7ae0ecf 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,38 +1,14 @@ -# Customise this file, documentation can be found here: -# https://github.com/fastlane/fastlane/tree/master/fastlane/docs -# All available actions: https://docs.fastlane.tools/actions -# can also be listed using the `fastlane actions` command - -# Change the syntax highlighting to Ruby -# All lines starting with a # are ignored when running `fastlane` - -# If you want to automatically update fastlane if a new version is available: -update_fastlane - -# This is the minimum version number required. -# Update this, if you use features of a newer version -fastlane_version "2.17.0" - default_platform :ios platform :ios do before_all do - cocoapods + cocoapods(repo_update: true) carthage(platform: "iOS", verbose: true) end - desc "Travis" - lane :travis do - test - beta - end - desc "Runs all the tests" lane :test do - scan( - scheme: "pass", - device: "iPhone 7" - ) + run_tests(scheme: "passTests") end desc "Submit a new Beta Build to Apple TestFlight" @@ -60,15 +36,17 @@ platform :ios do keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"], readonly: true ) - # ensure_git_status_clean increment_build_number( build_number: latest_testflight_build_number(version: get_version_number(target: "pass"), initial_build_number: 0) + 1, xcodeproj: "pass.xcodeproj" ) - # commit_version_bump(xcodeproj: "pass.xcodeproj") - # push_to_git_remote - gym(scheme: "pass") - pilot(skip_waiting_for_build_processing: true) + gym( + scheme: "pass", + verbose: true + ) + pilot( + skip_waiting_for_build_processing: true + ) mailgun( postmaster: ENV["MY_POSTMASTER"], apikey: ENV["MY_API_KEY"], @@ -82,28 +60,4 @@ platform :ios do message: "A new build has been uploaded by Travis CI.", ) end - - desc "Deploy a new version to the App Store" - lane :release do - # match(type: "appstore") - # snapshot - gym(scheme: "pass") # Build your app - more options available - deliver(force: true) - # frameit - end - - # You can define as many lanes as you want - - after_all do |lane| - end - - error do |lane, exception| - end end - - -# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md -# All available actions: https://docs.fastlane.tools/actions - -# fastlane reports which actions are used -# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer diff --git a/fastlane/travis.sh b/fastlane/travis.sh deleted file mode 100755 index 8040c70..0000000 --- a/fastlane/travis.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -gem update fastlane -gem install xcodeproj -if [ "$TRAVIS_PULL_REQUEST" == "true" ]; then - fastlane test; -else - fastlane travis; -fi -exit $?