From 705a32d610a94831e049ca218b5e94d0890ab28b Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sat, 22 Jul 2017 12:25:27 -0400 Subject: [PATCH] Uses chdir for building the app, credit to the @KrauseFx --- Gemfile.lock | 18 +++++++++--------- fastlane/Fastfile | 34 ++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e92b8ff..8368ef3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (2.3.5) - activesupport (4.2.8) + activesupport (4.2.9) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) @@ -47,7 +47,7 @@ GEM coderay (1.1.1) colored (1.2) colored2 (3.1.2) - commander-fastlane (4.4.4) + commander-fastlane (4.4.5) highline (~> 1.7.2) declarative (0.0.9) declarative-option (0.1.0) @@ -55,7 +55,7 @@ GEM unf (>= 0.0.5, < 1.0.0) dotenv (2.2.1) escape (0.0.4) - excon (0.57.0) + excon (0.57.1) faraday (0.12.1) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) @@ -64,19 +64,19 @@ GEM faraday_middleware (0.11.0.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.0) - fastlane (2.39.0) + fastlane (2.46.1) CFPropertyList (>= 2.3, < 3.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) bundler (>= 1.12.0, < 2.0.0) colored - commander-fastlane (>= 4.4.0, < 5.0.0) + commander-fastlane (>= 4.4.5, < 5.0.0) dotenv (>= 2.1.1, < 3.0.0) excon (>= 0.45.0, < 1.0.0) faraday (~> 0.9) faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 0.9) - fastimage (>= 1.6) + fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.0.1, < 2.0.0) google-api-client (>= 0.12.0, < 0.13.0) highline (>= 1.7.2, < 2.0.0) @@ -118,14 +118,14 @@ GEM http-cookie (1.0.3) domain_name (~> 0.5) httpclient (2.8.3) - i18n (0.8.4) + i18n (0.8.6) json (2.1.0) jwt (1.5.6) little-plugger (1.1.4) logging (2.2.2) little-plugger (~> 1.1) multi_json (~> 1.10) - memoist (0.15.0) + memoist (0.16.0) method_source (0.8.2) mime-types (3.1) mime-types-data (~> 3.2015) @@ -173,7 +173,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.4) - unicode-display_width (1.2.1) + unicode-display_width (1.3.0) word_wrap (1.0.0) xcodeproj (1.5.0) CFPropertyList (~> 2.3.3) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 35d49a7..d521dad 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -28,11 +28,13 @@ lane :ship do # configuration: 'Deploy', # scheme: 'Emission', # skip_build_archive: true, - # archive_path: '/Users/orta/Library/Developer/Xcode/Archives/2017-06-16/Emission 16-06-2017, 10.03.xcarchive' + # archive_path: '/Users/orta/Library/Developer/Xcode/Archives/2017-07-13/Emission 13-07-2017, 09.34.xcarchive' - gym workspace: 'emission/Example/Emission.xcworkspace', - configuration: 'Deploy', - scheme: 'Emission' + Dir.chdir("../emission/Example/Pods") do + gym workspace: 'Emission.xcworkspace', + configuration: 'Deploy', + scheme: 'Emission' + end # Get the last 10 lines of the CHANGELOG for Testflight changelog = '../emission/CHANGELOG.md' @@ -48,15 +50,19 @@ lane :ship do train = app.build_trains[latest_version] build_version = train.builds.count + 1 - # Do a tag, we use a http git remote so we can have push access - # as the default remote for travis is read-only - tag = "deploy-#{latest_version}-#{build_version}" - `git tag -d '#{tag}'` + # # Do a tag, we use a http git remote so we can have push access + # # as the default remote for travis is read-only + # tag = "deploy-#{latest_version}-#{build_version}" + # `git tag -d '#{tag}'` - # Tag releases - add_git_tag tag: tag - sh "git remote add http https://#{ENV['GITHUB_SUBMODULES_USER']}@github.com/artsy/emission.git" - sh "git push http #{tag}" + # # Tag releases + # add_git_tag tag: tag + # if ENV['GITHUB_SUBMODULES_USER'] + # sh "git remote add http https://#{ENV['GITHUB_SUBMODULES_USER']}@github.com/artsy/emission.git" + # else + # sh "git remote add http https://github.com/artsy/emission.git" + # end + # sh "git push http #{tag}" slack message: 'There is a new Emission beta available on Testflight.', payload: { @@ -102,8 +108,8 @@ lane :validate_env_vars do raise 'You need to set FASTLANE_USERNAME, FASTLANE_PASSWORD and MATCH_PASSWORD in your environment' end - unless ENV['GITHUB_SUBMODULES_USER'] - raise 'You need to set GITHUB_SUBMODULES_USER in your environment' + if ENV['GITHUB_SUBMODULES_USER'] + raise 'You may need to set GITHUB_SUBMODULES_USER in your environment, if you do not have access to artsy/emission-nebula' end unless ENV['SLACK_URL']