Skip to content

Commit

Permalink
[CI] Fix build pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
josefdolezal committed Jun 6, 2017
1 parent 40de752 commit f3d4c45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
10 changes: 2 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ osx_image: xcode8.3
before_install:
- sudo gem install xcov

script: ./scripts/build.sh

after_success:
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN

branches:
only:
- release
- dev

script:
- fastlane beta
15 changes: 5 additions & 10 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ default_platform :ios
platform :ios do
before_all do
ENV["CRASHLYTICS_NOTES"] = changelog_from_git_commits
carthage(
use_binaries: true,
platform: "iOS"
)
end

desc "Runs all the tests"
lane :test do
swiftlint
scan(scheme: "OctoPhone")
xcov(scheme: "OctoPhone")
end

desc "Submit a new Beta Build to Crashlytics"
desc "This will also make sure the profile is up to date"
lane :beta do
carthage(
use_binaries: true,
platform: "iOS"
)
swiftlint
scan(scheme: "OctoPhone")
xcov(scheme: "OctoPhone")
create_keychain(
Expand All @@ -45,11 +45,6 @@ platform :ios do

desc "Deploy a new version to the App Store"
lane :release do
carthage(
use_binaries: true,
platform: "iOS"
)
swiftlint
scan(
scheme: "OctoPhone"
)
Expand Down
7 changes: 7 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if [ $TRAVIS_BRANCH == "dev" ]; then
fastlane beta
elif [ $TRAVIS_BRANCH == "release" ]; then
fastlane release
else
fastlane test
fi

0 comments on commit f3d4c45

Please sign in to comment.