fastlane 2.170.0 → 2.171.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -74
  3. data/deliver/lib/deliver/app_screenshot.rb +5 -7
  4. data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
  5. data/deliver/lib/deliver/loader.rb +13 -29
  6. data/deliver/lib/deliver/upload_metadata.rb +2 -0
  7. data/{spaceship/lib/spaceship/connect_api/models/.app_data_usage_data_protection.rb.swp → fastlane/lib/fastlane/actions/.github_api.rb.swp} +0 -0
  8. data/fastlane/lib/fastlane/actions/.set_github_release.rb.swp +0 -0
  9. data/fastlane/lib/fastlane/actions/add_git_tag.rb +12 -3
  10. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +5 -1
  11. data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
  12. data/fastlane/lib/fastlane/actions/git_commit.rb +3 -3
  13. data/fastlane/lib/fastlane/actions/github_api.rb +14 -3
  14. data/fastlane/lib/fastlane/actions/nexus_upload.rb +1 -0
  15. data/fastlane/lib/fastlane/actions/pod_push.rb +9 -0
  16. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +9 -1
  17. data/fastlane/lib/fastlane/actions/set_github_release.rb +21 -8
  18. data/fastlane/lib/fastlane/actions/slack.rb +4 -5
  19. data/fastlane/lib/fastlane/actions/spm.rb +2 -2
  20. data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +4 -2
  21. data/fastlane/lib/fastlane/version.rb +1 -1
  22. data/fastlane/swift/Deliverfile.swift +1 -1
  23. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  24. data/fastlane/swift/Fastlane.swift +66 -13
  25. data/fastlane/swift/Gymfile.swift +1 -1
  26. data/fastlane/swift/GymfileProtocol.swift +1 -1
  27. data/fastlane/swift/Matchfile.swift +1 -1
  28. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  29. data/fastlane/swift/Precheckfile.swift +1 -1
  30. data/fastlane/swift/PrecheckfileProtocol.swift +5 -1
  31. data/fastlane/swift/Scanfile.swift +1 -1
  32. data/fastlane/swift/ScanfileProtocol.swift +5 -1
  33. data/fastlane/swift/Screengrabfile.swift +1 -1
  34. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  35. data/fastlane/swift/Snapshotfile.swift +1 -1
  36. data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
  37. data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
  38. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -4
  39. data/match/lib/match/encryption/openssl.rb +4 -2
  40. data/match/lib/match/storage/git_storage.rb +14 -10
  41. data/precheck/lib/precheck/options.rb +6 -1
  42. data/precheck/lib/precheck/rule_processor.rb +1 -1
  43. data/precheck/lib/precheck/runner.rb +1 -1
  44. data/scan/lib/scan/options.rb +5 -0
  45. data/scan/lib/scan/slack_poster.rb +1 -0
  46. data/screengrab/lib/screengrab/runner.rb +2 -0
  47. data/sigh/lib/sigh/runner.rb +1 -1
  48. data/snapshot/lib/snapshot/options.rb +1 -1
  49. data/spaceship/lib/spaceship/connect_api/api_client.rb +1 -1
  50. data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -0
  51. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +5 -1
  52. data/spaceship/lib/spaceship/connect_api/response.rb +3 -1
  53. metadata +21 -18
@@ -17,4 +17,4 @@ public class Screengrabfile: ScreengrabfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.170.0
20
+ // Generated with fastlane 2.171.0
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
96
96
 
97
97
  // Please don't remove the lines below
98
98
  // They are used to detect outdated files
99
- // FastlaneRunnerAPIVersion [0.9.51]
99
+ // FastlaneRunnerAPIVersion [0.9.52]
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.170.0
20
+ // Generated with fastlane 2.171.0
@@ -50,7 +50,7 @@ public protocol SnapshotfileProtocol: class {
50
50
  /// Enabling this option will prevent displaying the simulator window
51
51
  var headless: Bool { get }
52
52
 
53
- /// Enabling this option wil automatically override the status bar to show 9:41 AM, full battery, and full reception
53
+ /// Enabling this option will automatically override the status bar to show 9:41 AM, full battery, and full reception
54
54
  var overrideStatusBar: Bool { get }
55
55
 
56
56
  /// Enabling this option will configure the Simulator's system language
@@ -184,4 +184,4 @@ public extension SnapshotfileProtocol {
184
184
 
185
185
  // Please don't remove the lines below
186
186
  // They are used to detect outdated files
187
- // FastlaneRunnerAPIVersion [0.9.45]
187
+ // FastlaneRunnerAPIVersion [0.9.46]
@@ -14,7 +14,7 @@ module FastlaneCore
14
14
 
15
15
  def self.fastlane_enabled?
16
16
  # This is called from the root context on the first start
17
- @enabled ||= !FastlaneCore::FastlaneFolder.path.nil?
17
+ !FastlaneCore::FastlaneFolder.path.nil?
18
18
  end
19
19
 
20
20
  # Checks if fastlane is enabled for this project and returns the folder where the configuration lives
@@ -160,11 +160,10 @@ module FastlaneCore
160
160
  end
161
161
 
162
162
  deliver_additional_params = env_deliver_additional_params.to_s.strip
163
- if !deliver_additional_params.include?("-t ")
164
- UI.user_error!("Invalid transport parameter")
165
- else
166
- return deliver_additional_params
163
+ if deliver_additional_params.include?("-t ")
164
+ UI.important("Apple recommends you don’t specify the -t transport and instead allow Transporter to use automatic transport discovery to determine the best transport mode for your packages. For more information, please read Apple's Transporter User Guide 2.1: https://help.apple.com/itc/transporteruserguide/#/apdATD1E1288-D1E1A1303-D1E1288A1126")
167
165
  end
166
+ return deliver_additional_params
168
167
  end
169
168
  end
170
169
 
@@ -30,6 +30,7 @@ module Match
30
30
 
31
31
  def encrypt_files
32
32
  files = []
33
+ password = fetch_password!
33
34
  iterate(self.working_directory) do |current|
34
35
  files << current
35
36
  encrypt_specific_file(path: current, password: password)
@@ -41,6 +42,7 @@ module Match
41
42
 
42
43
  def decrypt_files
43
44
  files = []
45
+ password = fetch_password!
44
46
  iterate(self.working_directory) do |current|
45
47
  files << current
46
48
  begin
@@ -50,7 +52,7 @@ module Match
50
52
  UI.error("Couldn't decrypt the repo, please make sure you enter the right password!")
51
53
  UI.user_error!("Invalid password passed via 'MATCH_PASSWORD'") if ENV["MATCH_PASSWORD"]
52
54
  clear_password
53
- self.decrypt_files # call itself
55
+ self.decrypt_files # Call itself
54
56
  return
55
57
  end
56
58
  UI.success("🔓 Decrypted '#{File.basename(current)}'") if FastlaneCore::Globals.verbose?
@@ -83,7 +85,7 @@ module Match
83
85
  end
84
86
 
85
87
  # Access the MATCH_PASSWORD, either from ENV variable, Keychain or user input
86
- def password
88
+ def fetch_password!
87
89
  password = ENV["MATCH_PASSWORD"]
88
90
  unless password
89
91
  item = Security::InternetPassword.find(server: server_name(self.keychain_name))
@@ -89,15 +89,7 @@ module Match
89
89
  command += " -b #{self.branch.shellescape} --single-branch"
90
90
  end
91
91
 
92
- unless self.git_private_key.nil?
93
- if File.file?(self.git_private_key)
94
- ssh_add = File.expand_path(self.git_private_key).shellescape.to_s
95
- else
96
- UI.message("Private key file does not exist, will continue by using it as a raw key.")
97
- ssh_add = "- <<< \"#{self.git_private_key}\""
98
- end
99
- command = "ssh-agent bash -c 'ssh-add #{ssh_add}; #{command}'"
100
- end
92
+ command = command_from_private_key(command) unless self.git_private_key.nil?
101
93
 
102
94
  UI.message("Cloning remote git repo...")
103
95
  if self.branch && !self.clone_branch_directly
@@ -170,6 +162,16 @@ module Match
170
162
  Dir[File.join(working_directory, "**", file_name, "*.#{file_ext}")]
171
163
  end
172
164
 
165
+ def command_from_private_key(command)
166
+ if File.file?(self.git_private_key)
167
+ ssh_add = File.expand_path(self.git_private_key).shellescape.to_s
168
+ else
169
+ UI.message("Private key file does not exist, will continue by using it as a raw key.")
170
+ ssh_add = "- <<< \"#{self.git_private_key}\""
171
+ end
172
+ return "ssh-agent bash -c 'ssh-add #{ssh_add}; #{command}'"
173
+ end
174
+
173
175
  private
174
176
 
175
177
  # Create and checkout an specific branch in the git repo
@@ -231,7 +233,9 @@ module Match
231
233
  def git_push(commands: [], commit_message: nil)
232
234
  commit_message ||= generate_commit_message
233
235
  commands << "git commit -m #{commit_message.shellescape}"
234
- commands << "git push origin #{self.branch.shellescape}"
236
+ git_push_command = "git push origin #{self.branch.shellescape}"
237
+ git_push_command = command_from_private_key(git_push_command) unless self.git_private_key.nil?
238
+ commands << git_push_command
235
239
 
236
240
  UI.message("Pushing changes to remote git repo...")
237
241
  Helper.with_env_values('GIT_TERMINAL_PROMPT' => '0') do
@@ -97,7 +97,12 @@ module Precheck
97
97
  description: "Should check in-app purchases?",
98
98
  is_string: false,
99
99
  optional: true,
100
- default_value: true)
100
+ default_value: true),
101
+ FastlaneCore::ConfigItem.new(key: :use_live,
102
+ env_name: "PRECHECK_USE_LIVE",
103
+ description: "Should force check live app?",
104
+ is_string: false,
105
+ default_value: false)
101
106
  ] + rules
102
107
  end
103
108
  end
@@ -130,7 +130,7 @@ module Precheck
130
130
  items = []
131
131
 
132
132
  # App info localizations
133
- app_info = app.fetch_edit_app_info
133
+ app_info = Precheck.config[:use_live] ? app.fetch_live_app_info : app.fetch_latest_app_info
134
134
  app_info_localizations = app_info.get_app_info_localizations
135
135
  app_info_localizations.each do |localization|
136
136
  items << collect_text_items_from_language_item(locale: localization.locale,
@@ -185,7 +185,7 @@ module Precheck
185
185
 
186
186
  def latest_app_version
187
187
  platform = Spaceship::ConnectAPI::Platform.map(Precheck.config[:platform])
188
- @latest_version ||= app.get_edit_app_store_version(platform: platform)
188
+ @latest_version ||= Precheck.config[:use_live] ? app.get_live_app_store_version(platform: platform) : app.get_latest_app_store_version(platform: platform)
189
189
  end
190
190
 
191
191
  # Makes sure the current App ID exists. If not, it will show an appropriate error message
@@ -411,6 +411,11 @@ module Scan
411
411
  description: "Only post on Slack if the tests fail",
412
412
  is_string: false,
413
413
  default_value: false),
414
+ FastlaneCore::ConfigItem.new(key: :slack_default_payloads,
415
+ env_name: "SCAN_SLACK_DEFAULT_PAYLOADS",
416
+ description: "Specifies default payloads to include in Slack messages. For more info visit https://docs.fastlane.tools/actions/slack",
417
+ optional: true,
418
+ type: Array),
414
419
 
415
420
  # misc
416
421
  FastlaneCore::ConfigItem.new(key: :destination,
@@ -51,6 +51,7 @@ module Scan
51
51
  username: username,
52
52
  icon_url: icon_url,
53
53
  payload: {},
54
+ default_payloads: Scan.config[:slack_default_payloads],
54
55
  attachment_properties: {
55
56
  fields: fields
56
57
  }
@@ -24,6 +24,8 @@ module Screengrab
24
24
  end
25
25
 
26
26
  def run
27
+ # Standardize the locales
28
+ @config[:locales].map! { |locale| locale.gsub("_", "-") }
27
29
  FastlaneCore::PrintTable.print_values(config: @config, hide_keys: [], title: "Summary for screengrab #{Fastlane::VERSION}")
28
30
 
29
31
  app_apk_path = @config.fetch(:app_apk_path, ask: false)
@@ -327,7 +327,7 @@ module Sigh
327
327
  UI.important("Found more than one code signing identity. Choosing the first one. Check out `fastlane sigh --help` to see all available options.")
328
328
  UI.important("Available Code Signing Identities for current filters:")
329
329
  certificates.each do |c|
330
- str = ["\t- Name:", c.display_name, "- ID:", c.id + " - Expires", c.expires.strftime("%d/%m/%Y")].join(" ")
330
+ str = ["\t- Name:", c.display_name, "- ID:", c.id + " - Expires", Time.parse(c.expiration_date).strftime("%Y-%m-%d")].join(" ")
331
331
  UI.message(str.green)
332
332
  end
333
333
  end
@@ -123,7 +123,7 @@ module Snapshot
123
123
  type: Boolean),
124
124
  FastlaneCore::ConfigItem.new(key: :override_status_bar,
125
125
  env_name: 'SNAPSHOT_OVERRIDE_STATUS_BAR',
126
- description: "Enabling this option wil automatically override the status bar to show 9:41 AM, full battery, and full reception",
126
+ description: "Enabling this option will automatically override the status bar to show 9:41 AM, full battery, and full reception",
127
127
  default_value: false,
128
128
  is_string: false),
129
129
  FastlaneCore::ConfigItem.new(key: :localize_simulator,
@@ -196,7 +196,7 @@ module Spaceship
196
196
 
197
197
  store_csrf_tokens(response)
198
198
 
199
- return Spaceship::ConnectAPI::Response.new(body: response.body, status: response.status, client: self)
199
+ return Spaceship::ConnectAPI::Response.new(body: response.body, status: response.status, headers: response.headers, client: self)
200
200
  end
201
201
 
202
202
  def handle_401(response)
@@ -144,6 +144,12 @@ module Spaceship
144
144
  end.first
145
145
  end
146
146
 
147
+ def fetch_latest_app_info(client: nil, includes: Spaceship::ConnectAPI::AppInfo::ESSENTIAL_INCLUDES)
148
+ client ||= Spaceship::ConnectAPI
149
+ resp = client.get_app_infos(app_id: id, includes: includes)
150
+ return resp.to_models.first
151
+ end
152
+
147
153
  #
148
154
  # Available Territories
149
155
  #
@@ -21,6 +21,8 @@ module Spaceship
21
21
  attr_accessor :created_date
22
22
 
23
23
  attr_accessor :app_store_version_submission
24
+ attr_accessor :app_store_version_phased_release
25
+ attr_accessor :app_store_review_detail
24
26
 
25
27
  module AppStoreState
26
28
  READY_FOR_SALE = "READY_FOR_SALE"
@@ -58,7 +60,9 @@ module Spaceship
58
60
  "createdDate" => "created_date",
59
61
 
60
62
  "appStoreVersionSubmission" => "app_store_version_submission",
61
- "build" => "build"
63
+ "build" => "build",
64
+ "appStoreVersionPhasedRelease" => "app_store_version_phased_release",
65
+ "appStoreReviewDetail" => "app_store_review_detail"
62
66
  })
63
67
 
64
68
  ESSENTIAL_INCLUDES = [
@@ -6,11 +6,13 @@ module Spaceship
6
6
  include Enumerable
7
7
  attr_reader :body
8
8
  attr_reader :status
9
+ attr_reader :headers
9
10
  attr_reader :client
10
11
 
11
- def initialize(body: nil, status: nil, client: nil)
12
+ def initialize(body: nil, status: nil, headers: nil, client: nil)
12
13
  @body = body
13
14
  @status = status
15
+ @headers = headers
14
16
  @client = client
15
17
  end
16
18
 
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.170.0
4
+ version: 2.171.0
5
5
  platform: ruby
6
6
  authors:
7
- - Jimmy Dee
8
- - Aaron Brager
9
- - Jorge Revuelta H
10
- - Josh Holtz
7
+ - Maksym Grebenets
8
+ - Kohki Miki
11
9
  - Jan Piotrowski
12
- - Stefan Natchev
13
- - Iulian Onofrei
14
- - Jérôme Lacoste
15
10
  - Helmut Januschka
16
- - Luka Mirosevic
17
- - Matthew Ellis
18
- - Maksym Grebenets
11
+ - Joshua Liebowitz
12
+ - Aaron Brager
19
13
  - Andrew McBurney
14
+ - Danielle Tomlinson
15
+ - Jorge Revuelta H
20
16
  - Manu Wallner
21
- - Joshua Liebowitz
22
- - Felix Krause
23
- - Kohki Miki
17
+ - Josh Holtz
18
+ - Iulian Onofrei
19
+ - Stefan Natchev
24
20
  - Olivier Halligon
25
- - Daniel Jankowski
26
21
  - Max Ott
27
- - Danielle Tomlinson
22
+ - Daniel Jankowski
23
+ - Luka Mirosevic
24
+ - Jérôme Lacoste
28
25
  - Fumiya Nakamura
26
+ - Felix Krause
27
+ - Jimmy Dee
28
+ - Matthew Ellis
29
29
  autorequire:
30
30
  bindir: bin
31
31
  cert_chain: []
32
- date: 2020-12-04 00:00:00.000000000 Z
32
+ date: 2020-12-31 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: slack-notifier
@@ -945,6 +945,7 @@ files:
945
945
  - deliver/lib/deliver.rb
946
946
  - deliver/lib/deliver/app_screenshot.rb
947
947
  - deliver/lib/deliver/app_screenshot_iterator.rb
948
+ - deliver/lib/deliver/app_screenshot_validator.rb
948
949
  - deliver/lib/deliver/commands_generator.rb
949
950
  - deliver/lib/deliver/detect_values.rb
950
951
  - deliver/lib/deliver/download_screenshots.rb
@@ -985,6 +986,8 @@ files:
985
986
  - fastlane/lib/fastlane/action_collector.rb
986
987
  - fastlane/lib/fastlane/actions/.download_dsyms.rb.swp
987
988
  - fastlane/lib/fastlane/actions/.git_commit.rb.swp
989
+ - fastlane/lib/fastlane/actions/.github_api.rb.swp
990
+ - fastlane/lib/fastlane/actions/.set_github_release.rb.swp
988
991
  - fastlane/lib/fastlane/actions/README.md
989
992
  - fastlane/lib/fastlane/actions/actions_helper.rb
990
993
  - fastlane/lib/fastlane/actions/adb.rb
@@ -1056,6 +1059,7 @@ files:
1056
1059
  - fastlane/lib/fastlane/actions/docs/upload_to_testflight.md
1057
1060
  - fastlane/lib/fastlane/actions/dotgpg_environment.rb
1058
1061
  - fastlane/lib/fastlane/actions/download.rb
1062
+ - fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb
1059
1063
  - fastlane/lib/fastlane/actions/download_dsyms.rb
1060
1064
  - fastlane/lib/fastlane/actions/download_from_play_store.rb
1061
1065
  - fastlane/lib/fastlane/actions/dsym_zip.rb
@@ -1620,7 +1624,6 @@ files:
1620
1624
  - spaceship/lib/spaceship/connect_api/client.rb
1621
1625
  - spaceship/lib/spaceship/connect_api/file_uploader.rb
1622
1626
  - spaceship/lib/spaceship/connect_api/model.rb
1623
- - spaceship/lib/spaceship/connect_api/models/.app_data_usage_data_protection.rb.swp
1624
1627
  - spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp
1625
1628
  - spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb
1626
1629
  - spaceship/lib/spaceship/connect_api/models/app.rb