fastlane 2.146.0 → 2.149.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +86 -86
  3. data/cert/lib/cert/commands_generator.rb +1 -0
  4. data/credentials_manager/lib/credentials_manager/cli.rb +2 -0
  5. data/deliver/lib/deliver/app_screenshot.rb +3 -3
  6. data/deliver/lib/deliver/commands_generator.rb +1 -0
  7. data/deliver/lib/deliver/html_generator.rb +2 -2
  8. data/deliver/lib/deliver/submit_for_review.rb +5 -1
  9. data/fastlane/lib/{fastlane/actions/.update_code_signing_settings.rb.swp → assets/.s3_html_template.erb.swp} +0 -0
  10. data/fastlane/lib/assets/custom_action_template.rb +6 -6
  11. data/fastlane/lib/assets/s3_html_template.erb +1 -1
  12. data/fastlane/lib/fastlane/actions/.hipchat.rb.swp +0 -0
  13. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  14. data/fastlane/lib/fastlane/actions/cocoapods.rb +1 -1
  15. data/fastlane/lib/fastlane/actions/crashlytics.rb +0 -4
  16. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  17. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +42 -2
  18. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +3 -1
  19. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  20. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +2 -2
  21. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +12 -0
  22. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -1
  23. data/fastlane/lib/fastlane/actions/git_branch.rb +1 -1
  24. data/fastlane/lib/fastlane/actions/hipchat.rb +1 -1
  25. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +1 -1
  26. data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -3
  27. data/fastlane/lib/fastlane/actions/slack.rb +1 -1
  28. data/fastlane/lib/fastlane/actions/slather.rb +8 -1
  29. data/fastlane/lib/fastlane/actions/swiftlint.rb +14 -0
  30. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -1
  31. data/fastlane/lib/fastlane/actions/testfairy.rb +18 -3
  32. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +7 -2
  33. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +2 -2
  34. data/fastlane/lib/fastlane/actions/verify_xcode.rb +7 -0
  35. data/fastlane/lib/fastlane/actions/xcodebuild.rb +4 -4
  36. data/fastlane/lib/fastlane/cli_tools_distributor.rb +28 -6
  37. data/fastlane/lib/fastlane/commands_generator.rb +5 -2
  38. data/fastlane/lib/fastlane/documentation/actions_list.rb +1 -1
  39. data/fastlane/lib/fastlane/helper/lane_helper.rb +13 -0
  40. data/fastlane/lib/fastlane/lane_manager.rb +0 -10
  41. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +3 -3
  42. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +29 -0
  43. data/fastlane/lib/fastlane/swift_fastlane_function.rb +15 -2
  44. data/fastlane/lib/fastlane/swift_lane_manager.rb +0 -8
  45. data/fastlane/lib/fastlane/version.rb +1 -1
  46. data/fastlane/swift/Deliverfile.swift +1 -1
  47. data/fastlane/swift/Fastlane.swift +130 -26
  48. data/fastlane/swift/Gymfile.swift +1 -1
  49. data/fastlane/swift/GymfileProtocol.swift +1 -1
  50. data/fastlane/swift/LaneFileProtocol.swift +5 -2
  51. data/fastlane/swift/Matchfile.swift +1 -1
  52. data/fastlane/swift/MatchfileProtocol.swift +9 -1
  53. data/fastlane/swift/Precheckfile.swift +1 -1
  54. data/fastlane/swift/Scanfile.swift +1 -1
  55. data/fastlane/swift/ScanfileProtocol.swift +15 -3
  56. data/fastlane/swift/Screengrabfile.swift +1 -1
  57. data/fastlane/swift/Snapshotfile.swift +1 -1
  58. data/fastlane/swift/SnapshotfileProtocol.swift +25 -1
  59. data/fastlane_core/lib/fastlane_core/helper.rb +17 -0
  60. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +46 -2
  61. data/fastlane_core/lib/fastlane_core/project.rb +1 -0
  62. data/frameit/lib/frameit/commands_generator.rb +1 -0
  63. data/frameit/lib/frameit/device_types.rb +10 -0
  64. data/frameit/lib/frameit/options.rb +5 -2
  65. data/frameit/lib/frameit/runner.rb +5 -0
  66. data/frameit/lib/frameit/screenshot.rb +1 -0
  67. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  68. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +4 -0
  69. data/gym/lib/gym/options.rb +1 -1
  70. data/gym/lib/gym/runner.rb +14 -0
  71. data/match/lib/match/change_password.rb +1 -18
  72. data/match/lib/match/commands_generator.rb +1 -0
  73. data/match/lib/match/encryption/openssl.rb +1 -1
  74. data/match/lib/match/generator.rb +7 -2
  75. data/match/lib/match/nuke.rb +21 -16
  76. data/match/lib/match/options.rb +23 -1
  77. data/match/lib/match/storage/git_storage.rb +4 -0
  78. data/match/lib/match/storage/google_cloud_storage.rb +4 -0
  79. data/match/lib/match/storage/interface.rb +4 -0
  80. data/match/lib/match/storage/s3_storage.rb +4 -0
  81. data/match/lib/match/utils.rb +1 -1
  82. data/pem/lib/pem/commands_generator.rb +1 -0
  83. data/pilot/lib/pilot/build_manager.rb +23 -7
  84. data/pilot/lib/pilot/options.rb +5 -0
  85. data/produce/lib/produce/commands_generator.rb +1 -0
  86. data/scan/lib/scan/.options.rb.swp +0 -0
  87. data/scan/lib/scan/detect_values.rb +3 -0
  88. data/scan/lib/scan/options.rb +26 -3
  89. data/scan/lib/scan/runner.rb +2 -0
  90. data/scan/lib/scan/test_command_generator.rb +7 -2
  91. data/scan/lib/scan/test_result_parser.rb +9 -2
  92. data/screengrab/lib/screengrab/runner.rb +10 -9
  93. data/sigh/lib/sigh/commands_generator.rb +1 -0
  94. data/sigh/lib/sigh/options.rb +7 -1
  95. data/sigh/lib/sigh/runner.rb +2 -1
  96. data/snapshot/lib/assets/SnapfileTemplate +3 -0
  97. data/snapshot/lib/assets/SnapshotHelper.swift +12 -33
  98. data/snapshot/lib/snapshot/detect_values.rb +15 -0
  99. data/snapshot/lib/snapshot/options.rb +42 -0
  100. data/snapshot/lib/snapshot/reports_generator.rb +1 -1
  101. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  102. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +4 -0
  103. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +24 -1
  104. data/snapshot/lib/snapshot/test_command_generator.rb +8 -3
  105. data/snapshot/lib/snapshot/test_command_generator_base.rb +10 -1
  106. data/spaceship/lib/spaceship/base.rb +1 -1
  107. data/spaceship/lib/spaceship/client.rb +9 -1
  108. data/spaceship/lib/spaceship/commands_generator.rb +1 -0
  109. data/spaceship/lib/spaceship/connect_api/model.rb +6 -0
  110. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  111. data/spaceship/lib/spaceship/errors.rb +3 -0
  112. data/spaceship/lib/spaceship/tunes/iap.rb +15 -0
  113. data/spaceship/lib/spaceship/tunes/tunes_client.rb +14 -0
  114. data/supply/lib/supply/commands_generator.rb +1 -0
  115. data/supply/lib/supply/options.rb +9 -0
  116. data/supply/lib/supply/uploader.rb +4 -0
  117. metadata +47 -30
@@ -216,6 +216,8 @@ output_directory('./screenshots')
216
216
 
217
217
  clear_previous_screenshots(true)
218
218
 
219
+ override_status_bar(true)
220
+
219
221
  add_photos(["MyTestApp/Assets/demo.jpg"])
220
222
  ```
221
223
 
@@ -326,7 +328,7 @@ To get more information about language and locale codes please read [Internation
326
328
 
327
329
  ## Use a clean status bar
328
330
 
329
- You can use [SimulatorStatusMagic](https://github.com/shinydevelopment/SimulatorStatusMagic) to clean up the status bar.
331
+ You can set `override_status_bar` to `true` to set the status bar to Tuesday January 9th at 9:41AM with full battery and reception.
330
332
 
331
333
  ## Editing the `Snapfile`
332
334
 
@@ -329,7 +329,7 @@ Use [_deliver_](https://docs.fastlane.tools/actions/deliver/) to upload iOS scre
329
329
 
330
330
  ## Use a clean status bar
331
331
 
332
- You can use [SimulatorStatusMagic](https://github.com/shinydevelopment/SimulatorStatusMagic) to clean up the status bar.
332
+ You can set `override_status_bar` to `true` in snapshot to set the status bar to Tuesday January 9th at 9:41AM with full battery and reception.
333
333
 
334
334
  ## Gray artifacts around text
335
335
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ###### Easily sync your certificates and profiles across your team
6
6
 
7
- A new approach to iOS code signing: Share one code signing identity across your development team to simplify your codesigning setup and prevent code signing issues.
7
+ A new approach to iOS and macOS code signing: Share one code signing identity across your development team to simplify your codesigning setup and prevent code signing issues.
8
8
 
9
9
  _match_ is the implementation of the [codesigning.guide concept](https://codesigning.guide). _match_ creates all required certificates & provisioning profiles and stores them in a separate git repository, Google Cloud, or Amazon S3. Every team member with access to the selected storage can use those credentials for code signing. _match_ also automatically repairs broken and expired credentials. It's the easiest way to share signing credentials across teams
10
10
 
@@ -49,7 +49,7 @@ For more information about the concept, visit [codesigning.guide](https://codesi
49
49
 
50
50
  | | match |
51
51
  |----------|---------|
52
- 🔄 | Automatically sync your iOS keys and profiles across all your team members using git
52
+ 🔄 | Automatically sync your iOS and macOS keys and profiles across all your team members using git
53
53
  📦 | Handle all the heavy lifting of creating and storing your certificates and profiles
54
54
  💻 | Setup codesigning on a new machine in under a minute
55
55
  🎯 | Designed to work with apps with multiple targets and bundle identifiers
@@ -78,6 +78,12 @@ To gradually roll out a new build use
78
78
  fastlane supply --apk path/app.apk --track beta --rollout 0.5
79
79
  ```
80
80
 
81
+ To set the in-app update priority level for a release, set a valid update priority (an integer value from 0 to 5) using option `in_app_update_priority`
82
+
83
+ ```no-highlight
84
+ fastlane supply --apk path/app.apk --track beta --in_app_update_priority 3
85
+ ```
86
+
81
87
  ### Expansion files (`.obb`)
82
88
 
83
89
  Expansion files (obbs) found under the same directory as your APK will also be uploaded together with your APK as long as:
@@ -113,6 +119,12 @@ To gradually roll out a new build use
113
119
  fastlane supply --aab path/app.aab --track beta --rollout 0.5
114
120
  ```
115
121
 
122
+ To set the in-app update priority level for a release, set a valid update priority (an integer value from 0 to 5) using option `in_app_update_priority`
123
+
124
+ ```no-highlight
125
+ fastlane supply --aab path/app.aab --track beta --in_app_update_priority 3
126
+ ```
127
+
116
128
  ## Images and Screenshots
117
129
 
118
130
  After running `fastlane supply init`, you will have a metadata directory. This directory contains one or more locale directories (e.g. en-US, en-GB, etc.), and inside this directory are text files such as `title.txt` and `short_description.txt`.
@@ -26,7 +26,7 @@ module Fastlane
26
26
  # Login
27
27
  credentials = JSON.parse(json_key_data)
28
28
  callback_uri = 'https://fastlane.github.io/managed_google_play-callback/callback.html'
29
- uri = "https://play.google.com/apps/publish/delegatePrivateApp?service_account=#{credentials['client_email']}&continueUrl=#{URI.escape(callback_uri)}"
29
+ uri = "https://play.google.com/apps/publish/delegatePrivateApp?service_account=#{credentials['client_email']}&continueUrl=#{URI.encode_www_form_component(callback_uri)}"
30
30
 
31
31
  UI.message("To obtain publishing rights for custom apps on Managed Play Store, open the following URL and log in:")
32
32
  UI.message("")
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  module SharedValues
4
- GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH).freeze
4
+ GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH APPCENTER_BRANCH).freeze
5
5
  end
6
6
 
7
7
  class GitBranchAction < Action
@@ -25,7 +25,7 @@ module Fastlane
25
25
 
26
26
  message = options[:message]
27
27
  if (message_format == "html") && (options[:include_html_header] == true)
28
- message = "<table><tr><td><img src='https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png' width='50' height='50'></td><td>#{message[0..9999]}</td></tr></table>"
28
+ message = "<table><tr><td><img src='https://fastlane.tools/assets/img/fastlane_icon.png' width='50' height='50'></td><td>#{message[0..9999]}</td></tr></table>"
29
29
  end
30
30
 
31
31
  if api_version.to_i == 1
@@ -5,7 +5,7 @@ module Fastlane
5
5
  def self.run(params)
6
6
  local_branch = params[:local_branch]
7
7
  local_branch ||= Actions.git_branch.gsub(%r{#{params[:remote]}\/}, '') if Actions.git_branch
8
- local_branch ||= 'master'
8
+ UI.user_error!('Failed to get the current branch.') unless local_branch
9
9
 
10
10
  remote_branch = params[:remote_branch] || local_branch
11
11
 
@@ -8,9 +8,9 @@ module Fastlane
8
8
  cmd << ['bundle exec'] if params[:use_bundle_exec] && shell_out_should_use_bundle_exec?
9
9
  cmd << ['pod keys set']
10
10
 
11
- cmd << ["\"#{params[:key].shellescape}\""]
12
- cmd << ["\"#{params[:value].shellescape}\""]
13
- cmd << ["\"#{params[:project].shellescape}\""] if params[:project]
11
+ cmd << ["\"#{params[:key]}\""]
12
+ cmd << ["\"#{params[:value]}\""]
13
+ cmd << ["\"#{params[:project]}\""] if params[:project]
14
14
 
15
15
  Actions.sh(cmd.join(' '))
16
16
  end
@@ -105,7 +105,7 @@ module Fastlane
105
105
  FastlaneCore::ConfigItem.new(key: :icon_url,
106
106
  env_name: "FL_SLACK_ICON_URL",
107
107
  description: "Overrides the webhook's image property if use_webhook_configured_username_and_icon is false",
108
- default_value: "https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png",
108
+ default_value: "https://fastlane.tools/assets/img/fastlane_icon.png",
109
109
  is_string: true,
110
110
  optional: true),
111
111
  FastlaneCore::ConfigItem.new(key: :payload,
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  class SlatherAction < Action
4
- # https://github.com/SlatherOrg/slather/blob/v2.4.2/lib/slather/command/coverage_command.rb
4
+ # https://github.com/SlatherOrg/slather/blob/v2.4.9/lib/slather/command/coverage_command.rb
5
5
  ARGS_MAP = {
6
6
  travis: '--travis',
7
7
  travis_pro: '--travispro',
@@ -14,6 +14,7 @@ module Fastlane
14
14
  simple_output: '--simple-output',
15
15
  gutter_json: '--gutter-json',
16
16
  cobertura_xml: '--cobertura-xml',
17
+ sonarqube_xml: '--sonarqube-xml',
17
18
  llvm_cov: '--llvm-cov',
18
19
  html: '--html',
19
20
  show: '--show',
@@ -213,6 +214,12 @@ module Fastlane
213
214
  is_string: false,
214
215
  type: Boolean,
215
216
  optional: true),
217
+ FastlaneCore::ConfigItem.new(key: :sonarqube_xml,
218
+ env_name: "FL_SLATHER_SONARQUBE_XML_ENABLED",
219
+ description: "Tell slather that it should output results as SonarQube Generic XML format",
220
+ is_string: false,
221
+ type: Boolean,
222
+ optional: true),
216
223
  FastlaneCore::ConfigItem.new(key: :llvm_cov,
217
224
  env_name: "FL_SLATHER_LLVM_COV_ENABLED",
218
225
  description: "Tell slather that it should output results as llvm-cov show format",
@@ -88,11 +88,13 @@ module Fastlane
88
88
  def self.available_options
89
89
  [
90
90
  FastlaneCore::ConfigItem.new(key: :mode,
91
+ env_name: "FL_SWIFTLINT_MODE",
91
92
  description: "SwiftLint mode: :lint, :autocorrect or :analyze",
92
93
  is_string: false,
93
94
  default_value: :lint,
94
95
  optional: true),
95
96
  FastlaneCore::ConfigItem.new(key: :path,
97
+ env_name: "FL_SWIFTLINT_PATH",
96
98
  description: "Specify path to lint",
97
99
  is_string: true,
98
100
  optional: true,
@@ -100,22 +102,27 @@ module Fastlane
100
102
  UI.user_error!("Couldn't find path '#{File.expand_path(value)}'") unless File.exist?(value)
101
103
  end),
102
104
  FastlaneCore::ConfigItem.new(key: :output_file,
105
+ env_name: "FL_SWIFTLINT_OUTPUT_FILE",
103
106
  description: 'Path to output SwiftLint result',
104
107
  optional: true),
105
108
  FastlaneCore::ConfigItem.new(key: :config_file,
109
+ env_name: "FL_SWIFTLINT_CONFIG_FILE",
106
110
  description: 'Custom configuration file of SwiftLint',
107
111
  optional: true),
108
112
  FastlaneCore::ConfigItem.new(key: :strict,
113
+ env_name: "FL_SWIFTLINT_STRICT",
109
114
  description: 'Fail on warnings? (true/false)',
110
115
  default_value: false,
111
116
  is_string: false,
112
117
  type: Boolean,
113
118
  optional: true),
114
119
  FastlaneCore::ConfigItem.new(key: :files,
120
+ env_name: "FL_SWIFTLINT_FILES",
115
121
  description: 'List of files to process',
116
122
  is_string: false,
117
123
  optional: true),
118
124
  FastlaneCore::ConfigItem.new(key: :ignore_exit_status,
125
+ env_name: "FL_SWIFTLINT_IGNORE_EXIT_STATUS",
119
126
  description: "Ignore the exit status of the SwiftLint command, so that serious violations \
120
127
  don't fail the build (true/false)",
121
128
  default_value: false,
@@ -123,6 +130,7 @@ module Fastlane
123
130
  type: Boolean,
124
131
  optional: true),
125
132
  FastlaneCore::ConfigItem.new(key: :raise_if_swiftlint_error,
133
+ env_name: "FL_SWIFTLINT_RAISE_IF_SWIFTLINT_ERROR",
126
134
  description: "Raises an error if swiftlint fails, so you can fail CI/CD jobs if necessary \
127
135
  (true/false)",
128
136
  default_value: false,
@@ -130,6 +138,7 @@ module Fastlane
130
138
  type: Boolean,
131
139
  optional: true),
132
140
  FastlaneCore::ConfigItem.new(key: :reporter,
141
+ env_name: "FL_SWIFTLINT_REPORTER",
133
142
  description: "Choose output reporter. Available: xcode, json, csv, checkstyle, junit, html, \
134
143
  emoji, sonarqube, markdown, github-actions-logging",
135
144
  is_string: true,
@@ -139,28 +148,33 @@ module Fastlane
139
148
  UI.user_error!("Available values are '#{available.join("', '")}'") unless available.include?(value)
140
149
  end),
141
150
  FastlaneCore::ConfigItem.new(key: :quiet,
151
+ env_name: "FL_SWIFTLINT_QUIET",
142
152
  description: "Don't print status logs like 'Linting <file>' & 'Done linting'",
143
153
  default_value: false,
144
154
  is_string: false,
145
155
  type: Boolean,
146
156
  optional: true),
147
157
  FastlaneCore::ConfigItem.new(key: :executable,
158
+ env_name: "FL_SWIFTLINT_EXECUTABLE",
148
159
  description: "Path to the `swiftlint` executable on your machine",
149
160
  is_string: true,
150
161
  optional: true),
151
162
  FastlaneCore::ConfigItem.new(key: :format,
163
+ env_name: "FL_SWIFTLINT_FORMAT",
152
164
  description: "Format code when mode is :autocorrect",
153
165
  default_value: false,
154
166
  is_string: false,
155
167
  type: Boolean,
156
168
  optional: true),
157
169
  FastlaneCore::ConfigItem.new(key: :no_cache,
170
+ env_name: "FL_SWIFTLINT_NO_CACHE",
158
171
  description: "Ignore the cache when mode is :autocorrect or :lint",
159
172
  default_value: false,
160
173
  is_string: false,
161
174
  type: Boolean,
162
175
  optional: true),
163
176
  FastlaneCore::ConfigItem.new(key: :compiler_log_path,
177
+ env_name: "FL_SWIFTLINT_COMPILER_LOG_PATH",
164
178
  description: "Compiler log path when mode is :analyze",
165
179
  is_string: true,
166
180
  optional: true,
@@ -83,7 +83,7 @@ module Fastlane
83
83
  end
84
84
 
85
85
  def self.is_supported?(platform)
86
- platform == :ios
86
+ [:ios, :mac].include?(platform)
87
87
  end
88
88
 
89
89
  def self.example_code
@@ -2,6 +2,8 @@ module Fastlane
2
2
  module Actions
3
3
  module SharedValues
4
4
  TESTFAIRY_BUILD_URL = :TESTFAIRY_BUILD_URL
5
+ TESTFAIRY_DOWNLOAD_URL = :TESTFAIRY_DOWNLOAD_URL
6
+ TESTFAIRY_LANDING_PAGE = :TESTFAIRY_LANDING_PAGE
5
7
  end
6
8
 
7
9
  class TestfairyAction < Action
@@ -107,6 +109,8 @@ module Fastlane
107
109
  response = self.upload_build(params[:upload_url], path, client_options, params[:timeout])
108
110
  if parse_response(response)
109
111
  UI.success("Build URL: #{Actions.lane_context[SharedValues::TESTFAIRY_BUILD_URL]}")
112
+ UI.success("Download URL: #{Actions.lane_context[SharedValues::TESTFAIRY_DOWNLOAD_URL]}")
113
+ UI.success("Landing Page URL: #{Actions.lane_context[SharedValues::TESTFAIRY_LANDING_PAGE]}")
110
114
  UI.success("Build successfully uploaded to TestFairy.")
111
115
  else
112
116
  UI.user_error!("Error when trying to upload ipa to TestFairy")
@@ -120,8 +124,12 @@ module Fastlane
120
124
  def self.parse_response(response)
121
125
  if response.body && response.body.key?('status') && response.body['status'] == 'ok'
122
126
  build_url = response.body['build_url']
127
+ app_url = response.body['app_url']
128
+ landing_page_url = response.body['landing_page_url']
123
129
 
124
130
  Actions.lane_context[SharedValues::TESTFAIRY_BUILD_URL] = build_url
131
+ Actions.lane_context[SharedValues::TESTFAIRY_DOWNLOAD_URL] = app_url
132
+ Actions.lane_context[SharedValues::TESTFAIRY_LANDING_PAGE] = landing_page_url
125
133
 
126
134
  return true
127
135
  else
@@ -244,7 +252,12 @@ module Fastlane
244
252
  api_key: "...",
245
253
  ipa: "./ipa_file.ipa",
246
254
  comment: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
247
- )'
255
+ )',
256
+ 'testfairy(
257
+ api_key: "...",
258
+ apk: "../build/app/outputs/apk/qa/release/app-qa-release.apk",
259
+ comment: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
260
+ )'
248
261
  ]
249
262
  end
250
263
 
@@ -254,12 +267,14 @@ module Fastlane
254
267
 
255
268
  def self.output
256
269
  [
257
- ['TESTFAIRY_BUILD_URL', 'URL of the newly uploaded build']
270
+ ['TESTFAIRY_BUILD_URL', 'URL for the sessions of the newly uploaded build'],
271
+ ['TESTFAIRY_DOWNLOAD_URL', 'URL directly to the newly uploaded build'],
272
+ ['TESTFAIRY_LANDING_PAGE', 'URL of the build\'s landing page']
258
273
  ]
259
274
  end
260
275
 
261
276
  def self.authors
262
- ["taka0125", "tcurdt", "vijaysharm"]
277
+ ["taka0125", "tcurdt", "vijaysharm", "cdm2012"]
263
278
  end
264
279
 
265
280
  def self.is_supported?(platform)
@@ -90,10 +90,15 @@ module Fastlane
90
90
  end
91
91
 
92
92
  def self.set_build_setting(configuration, name, value)
93
- codesign_build_settings_keys = configuration.build_settings.keys.select { |key| key.to_s.match(/#{name}.*/) }
94
- codesign_build_settings_keys.each do |key|
93
+ # Iterate over any keys that start with this name
94
+ # This will also set keys that have filtering like [sdk=iphoneos*]
95
+ keys = configuration.build_settings.keys.select { |key| key.to_s.match(/#{name}.*/) }
96
+ keys.each do |key|
95
97
  configuration.build_settings[key] = value
96
98
  end
99
+
100
+ # Explicitly set the key with value if keys don't exist
101
+ configuration.build_settings[name] = value
97
102
  end
98
103
 
99
104
  def self.description
@@ -119,7 +119,7 @@ module Fastlane
119
119
  end
120
120
 
121
121
  def self.find_gsp_path(params)
122
- return if params[:api_token]
122
+ return if params[:api_token] && params[:gsp_path].nil?
123
123
 
124
124
  if params[:gsp_path].to_s.length > 0
125
125
  params[:gsp_path] = File.expand_path(params[:gsp_path])
@@ -130,7 +130,7 @@ module Fastlane
130
130
  end
131
131
 
132
132
  def self.find_binary_path(params)
133
- params[:binary_path] ||= (Dir["/Applications/Fabric.app/**/upload-symbols"] + Dir["./Pods/Fabric/upload-symbols"] + Dir["./Pods/FirebaseCrashlytics/upload-symbols"]).last
133
+ params[:binary_path] ||= (Dir["/Applications/Fabric.app/**/upload-symbols"] + Dir["./Pods/Fabric/upload-symbols"] + Dir["./scripts/upload-symbols"] + Dir["./Pods/FirebaseCrashlytics/upload-symbols"]).last
134
134
  UI.user_error!("Failed to find Fabric's upload_symbols binary at /Applications/Fabric.app/**/upload-symbols or ./Pods/**/upload-symbols. Please specify the location of the binary explicitly by using the binary_path option") unless params[:binary_path]
135
135
 
136
136
  params[:binary_path] = File.expand_path(params[:binary_path])
@@ -33,6 +33,13 @@ module Fastlane
33
33
  "Authority=Apple Root CA",
34
34
  "TeamIdentifier=59GAB85EFG"
35
35
  ],
36
+ [ # Found on App Store installed Xcode installations post-Xcode 11.3
37
+ "Identifier=com.apple.dt.Xcode",
38
+ "Authority=Apple Mac OS Application Signing",
39
+ "Authority=Apple Worldwide Developer Relations Certification Authority",
40
+ "Authority=Apple Root CA",
41
+ "TeamIdentifier=APPLECOMPUTER"
42
+ ],
36
43
  [ # Found on Xcode installations (pre-Xcode 8) downloaded from developer.apple.com
37
44
  "Identifier=com.apple.dt.Xcode",
38
45
  "Authority=Software Signing",
@@ -307,10 +307,10 @@ module Fastlane
307
307
  export_options[:teamID] = CredentialsManager::AppfileConfig.try_fetch_value(:team_id) if !export_options[:teamID] && CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
308
308
  export_options[:onDemandResourcesAssetPacksBaseURL] = URI.escape(export_options[:onDemandResourcesAssetPacksBaseURL]) if export_options[:onDemandResourcesAssetPacksBaseURL]
309
309
  if export_options[:manifest]
310
- export_options[:manifest][:appURL] = URI.escape(export_options[:manifest][:appURL]) if export_options[:manifest][:appURL]
311
- export_options[:manifest][:displayImageURL] = URI.escape(export_options[:manifest][:displayImageURL]) if export_options[:manifest][:displayImageURL]
312
- export_options[:manifest][:fullSizeImageURL] = URI.escape(export_options[:manifest][:fullSizeImageURL]) if export_options[:manifest][:fullSizeImageURL]
313
- export_options[:manifest][:assetPackManifestURL] = URI.escape(export_options[:manifest][:assetPackManifestURL]) if export_options[:manifest][:assetPackManifestURL]
310
+ export_options[:manifest][:appURL] = URI.encode_www_form_component(export_options[:manifest][:appURL]) if export_options[:manifest][:appURL]
311
+ export_options[:manifest][:displayImageURL] = URI.encode_www_form_component(export_options[:manifest][:displayImageURL]) if export_options[:manifest][:displayImageURL]
312
+ export_options[:manifest][:fullSizeImageURL] = URI.encode_www_form_component(export_options[:manifest][:fullSizeImageURL]) if export_options[:manifest][:fullSizeImageURL]
313
+ export_options[:manifest][:assetPackManifestURL] = URI.encode_www_form_component(export_options[:manifest][:assetPackManifestURL]) if export_options[:manifest][:assetPackManifestURL]
314
314
  end
315
315
 
316
316
  # Saves options to plist
@@ -44,6 +44,12 @@ module Fastlane
44
44
  else
45
45
  require "fastlane"
46
46
  end
47
+
48
+ # Loading any .env files before any lanes are called since
49
+ # variables like FASTLANE_HIDE_CHANGELOG, SKIP_SLOW_FASTLANE_WARNING
50
+ # and FASTLANE_DISABLE_COLORS need to be set early on in execution
51
+ load_dot_env
52
+
47
53
  # We want to avoid printing output other than the version number if we are running `fastlane -v`
48
54
  unless running_version_command? || running_init_command?
49
55
  print_bundle_exec_warning(is_slow: (Time.now - before_import_time > 3))
@@ -59,12 +65,6 @@ module Fastlane
59
65
  end
60
66
  end
61
67
 
62
- # Loading any .env files before any lanes are called since
63
- # variables like FASTLANE_HIDE_CHANGELOG and FASTLANE_DISABLE_COLORS
64
- # need to be set early on in execution
65
- require 'fastlane/helper/dotenv_helper'
66
- Fastlane::Helper::DotenvHelper.load_dot_env(nil)
67
-
68
68
  # Needs to go after load_dot_env for variable FASTLANE_SKIP_UPDATE_CHECK
69
69
  FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
70
70
 
@@ -122,6 +122,28 @@ module Fastlane
122
122
  FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
123
123
  end
124
124
 
125
+ # Since loading dotenv should respect additional environments passed using
126
+ # --env, we must extrat the arguments out of ARGV and process them before
127
+ # calling into commander. This is required since the ENV must be configured
128
+ # before running any other commands in order to correclty respect variables
129
+ # like FASTLANE_HIDE_CHANGELOG and FASTLANE_DISABLE_COLORS
130
+ def load_dot_env
131
+ env_cl_param = lambda do
132
+ index = ARGV.index("--env")
133
+ return nil if index.nil?
134
+ ARGV.delete_at(index)
135
+
136
+ return nil if ARGV[index].nil?
137
+ value = ARGV[index]
138
+ ARGV.delete_at(index)
139
+
140
+ value
141
+ end
142
+
143
+ require 'fastlane/helper/dotenv_helper'
144
+ Fastlane::Helper::DotenvHelper.load_dot_env(env_cl_param.call)
145
+ end
146
+
125
147
  # Since fastlane also supports the rocket and biceps emoji as executable
126
148
  # we need to map those to the appropriate tools
127
149
  def process_emojis(tool_name)