fastlane 2.180.0 → 2.183.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +86 -86
  3. data/cert/lib/cert/commands_generator.rb +2 -1
  4. data/deliver/lib/assets/summary.html.erb +10 -10
  5. data/deliver/lib/deliver/commands_generator.rb +2 -1
  6. data/deliver/lib/deliver/languages.rb +1 -1
  7. data/deliver/lib/deliver/options.rb +2 -2
  8. data/deliver/lib/deliver/submit_for_review.rb +3 -3
  9. data/deliver/lib/deliver/upload_metadata.rb +1 -1
  10. data/fastlane/lib/fastlane/actions/actions_helper.rb +2 -2
  11. data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +1 -1
  12. data/fastlane/lib/fastlane/actions/clipboard.rb +3 -6
  13. data/fastlane/lib/fastlane/actions/danger.rb +7 -1
  14. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
  15. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +18 -1
  16. data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +2 -6
  17. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +3 -1
  18. data/fastlane/lib/fastlane/actions/git_branch.rb +1 -1
  19. data/fastlane/lib/fastlane/actions/git_commit.rb +3 -1
  20. data/fastlane/lib/fastlane/actions/git_pull.rb +4 -10
  21. data/fastlane/lib/fastlane/actions/git_submodule_update.rb +16 -8
  22. data/fastlane/lib/fastlane/actions/hipchat.rb +2 -1
  23. data/fastlane/lib/fastlane/actions/import_from_git.rb +5 -5
  24. data/fastlane/lib/fastlane/actions/notification.rb +1 -1
  25. data/fastlane/lib/fastlane/actions/slack.rb +155 -133
  26. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -2
  27. data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -5
  28. data/fastlane/lib/fastlane/cli_tools_distributor.rb +1 -1
  29. data/fastlane/lib/fastlane/commands_generator.rb +2 -1
  30. data/fastlane/lib/fastlane/fast_file.rb +10 -2
  31. data/fastlane/lib/fastlane/fastlane_require.rb +7 -1
  32. data/fastlane/lib/fastlane/helper/git_helper.rb +9 -1
  33. data/fastlane/lib/fastlane/lane_manager.rb +3 -2
  34. data/fastlane/lib/fastlane/notification/slack.rb +56 -0
  35. data/fastlane/lib/fastlane/plugins/plugin_info.rb +2 -2
  36. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +7 -6
  37. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +30 -35
  38. data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +1 -1
  39. data/fastlane/lib/fastlane/swift_fastlane_function.rb +35 -14
  40. data/fastlane/lib/fastlane/version.rb +2 -2
  41. data/fastlane/swift/Deliverfile.swift +1 -1
  42. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  43. data/fastlane/swift/Fastlane.swift +6621 -3802
  44. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +4 -0
  45. data/fastlane/swift/Gymfile.swift +1 -1
  46. data/fastlane/swift/GymfileProtocol.swift +1 -1
  47. data/fastlane/swift/Matchfile.swift +1 -1
  48. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  49. data/fastlane/swift/OptionalConfigValue.swift +131 -0
  50. data/fastlane/swift/Precheckfile.swift +1 -1
  51. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  52. data/fastlane/swift/Scanfile.swift +1 -1
  53. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  54. data/fastlane/swift/Screengrabfile.swift +1 -1
  55. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  56. data/fastlane/swift/Snapshotfile.swift +1 -1
  57. data/fastlane/swift/SnapshotfileProtocol.swift +5 -1
  58. data/fastlane/swift/formatting/Brewfile.lock.json +17 -15
  59. data/fastlane/swift/upgrade_manifest.json +1 -1
  60. data/fastlane_core/lib/fastlane_core.rb +22 -21
  61. data/fastlane_core/lib/fastlane_core/build_watcher.rb +65 -11
  62. data/fastlane_core/lib/fastlane_core/clipboard.rb +20 -0
  63. data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
  64. data/fastlane_core/lib/fastlane_core/helper.rb +4 -4
  65. data/fastlane_core/lib/fastlane_core/languages.rb +2 -2
  66. data/fastlane_core/lib/fastlane_core/swag.rb +1 -1
  67. data/fastlane_core/lib/fastlane_core/ui/help.erb +35 -0
  68. data/fastlane_core/lib/fastlane_core/ui/help_formatter.rb +16 -0
  69. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +4 -1
  70. data/frameit/lib/frameit/commands_generator.rb +2 -1
  71. data/frameit/lib/frameit/config_parser.rb +2 -2
  72. data/frameit/lib/frameit/frame_downloader.rb +2 -1
  73. data/gym/lib/gym/code_signing_mapping.rb +2 -2
  74. data/gym/lib/gym/commands_generator.rb +2 -1
  75. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +6 -5
  76. data/gym/lib/gym/runner.rb +5 -1
  77. data/match/lib/match/commands_generator.rb +2 -1
  78. data/pem/lib/pem/commands_generator.rb +2 -1
  79. data/pilot/lib/pilot/build_manager.rb +3 -3
  80. data/pilot/lib/pilot/commands_generator.rb +2 -1
  81. data/pilot/lib/pilot/options.rb +2 -2
  82. data/pilot/lib/pilot/tester_exporter.rb +0 -1
  83. data/pilot/lib/pilot/tester_manager.rb +0 -1
  84. data/precheck/lib/precheck/commands_generator.rb +2 -1
  85. data/produce/lib/produce/commands_generator.rb +2 -1
  86. data/scan/lib/scan/commands_generator.rb +2 -1
  87. data/scan/lib/scan/runner.rb +3 -1
  88. data/scan/lib/scan/test_command_generator.rb +3 -1
  89. data/screengrab/lib/screengrab/commands_generator.rb +2 -1
  90. data/sigh/lib/sigh/commands_generator.rb +2 -1
  91. data/snapshot/lib/assets/SnapfileTemplate +1 -1
  92. data/snapshot/lib/snapshot/commands_generator.rb +3 -1
  93. data/snapshot/lib/snapshot/options.rb +5 -0
  94. data/snapshot/lib/snapshot/reports_generator.rb +4 -0
  95. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  96. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
  97. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +8 -4
  98. data/spaceship/README.md +2 -12
  99. data/spaceship/lib/spaceship/base.rb +2 -2
  100. data/spaceship/lib/spaceship/commands_generator.rb +4 -2
  101. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  102. data/spaceship/lib/spaceship/connect_api/models/profile.rb +6 -0
  103. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +6 -2
  104. data/spaceship/lib/spaceship/spaceauth_runner.rb +19 -9
  105. data/spaceship/lib/spaceship/tunes/members.rb +1 -1
  106. data/spaceship/lib/spaceship/ui.rb +2 -2
  107. data/supply/lib/supply/.client.rb.swp +0 -0
  108. data/supply/lib/supply/.listing.rb.swp +0 -0
  109. data/supply/lib/supply/.uploader.rb.swp +0 -0
  110. data/supply/lib/supply/client.rb +4 -2
  111. data/supply/lib/supply/commands_generator.rb +2 -1
  112. data/supply/lib/supply/options.rb +2 -2
  113. data/supply/lib/supply/uploader.rb +1 -0
  114. metadata +75 -84
  115. data/pilot/lib/pilot/tester_util.rb +0 -0
@@ -164,8 +164,10 @@ module Scan
164
164
 
165
165
  # The path to the result bundle
166
166
  def result_bundle_path
167
+ retry_count = Scan.cache[:retry_attempt] || 0
168
+ attempt = retry_count > 0 ? "-#{retry_count}" : ""
167
169
  ext = FastlaneCore::Helper.xcode_version.to_i >= 11 ? '.xcresult' : '.test_result'
168
- path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ext
170
+ path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + attempt + ext
169
171
  if File.directory?(path)
170
172
  FileUtils.remove_dir(path)
171
173
  end
@@ -1,6 +1,7 @@
1
1
  require 'commander'
2
2
 
3
3
  require 'fastlane/version'
4
+ require 'fastlane_core/ui/help_formatter'
4
5
  require 'fastlane_core/fastlane_folder'
5
6
  require 'fastlane_core/configuration/configuration'
6
7
  require_relative 'android_environment'
@@ -26,7 +27,7 @@ module Screengrab
26
27
  program :help, 'Authors', 'Andrea Falcone <asfalcone@google.com>, Michael Furtak <mfurtak@google.com>'
27
28
  program :help, 'Website', 'https://fastlane.tools'
28
29
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/screengrab/'
29
- program :help_formatter, :compact
30
+ program :help_formatter, FastlaneCore::HelpFormatter
30
31
 
31
32
  global_option('--verbose', 'Shows a more verbose output') { FastlaneCore::Globals.verbose = true }
32
33
 
@@ -1,5 +1,6 @@
1
1
  require 'commander'
2
2
  require 'fastlane/version'
3
+ require 'fastlane_core/ui/help_formatter'
3
4
 
4
5
  require_relative 'options'
5
6
  require_relative 'resign'
@@ -23,7 +24,7 @@ module Sigh
23
24
  program :help, 'Author', 'Felix Krause <sigh@krausefx.com>'
24
25
  program :help, 'Website', 'https://fastlane.tools'
25
26
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/sigh/'
26
- program :help_formatter, :compact
27
+ program :help_formatter, FastlaneCore::HelpFormatter
27
28
 
28
29
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
29
30
  global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
@@ -27,7 +27,7 @@
27
27
  # remove the '#' to clear all previously generated screenshots before creating new ones
28
28
  # clear_previous_screenshots(true)
29
29
 
30
- # Remove the '#' to set the status bar to 9:41 AM, and show full battery and reception.
30
+ # Remove the '#' to set the status bar to 9:41 AM, and show full battery and reception. See also override_status_bar_arguments for custom options.
31
31
  # override_status_bar(true)
32
32
 
33
33
  # Arguments to pass to the app on launch. See https://docs.fastlane.tools/actions/snapshot/#launch-arguments
@@ -1,5 +1,7 @@
1
1
  require 'commander'
2
2
 
3
+ require 'fastlane_core/ui/help_formatter'
4
+
3
5
  require_relative 'module'
4
6
  require_relative 'runner'
5
7
  require_relative 'options'
@@ -21,7 +23,7 @@ module Snapshot
21
23
  program :help, 'Author', 'Felix Krause <snapshot@krausefx.com>'
22
24
  program :help, 'Website', 'https://fastlane.tools'
23
25
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/snapshot/'
24
- program :help_formatter, :compact
26
+ program :help_formatter, FastlaneCore::HelpFormatter
25
27
 
26
28
  global_option('--verbose', 'Shows a more verbose output') { FastlaneCore::Globals.verbose = true }
27
29
 
@@ -126,6 +126,11 @@ module Snapshot
126
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
+ FastlaneCore::ConfigItem.new(key: :override_status_bar_arguments,
130
+ env_name: 'SNAPSHOT_OVERRIDE_STATUS_BAR_ARGUMENTS',
131
+ description: "Fully customize the status bar by setting each option here. See `xcrun simctl status_bar --help`",
132
+ optional: true,
133
+ type: String),
129
134
  FastlaneCore::ConfigItem.new(key: :localize_simulator,
130
135
  env_name: 'SNAPSHOT_LOCALIZE_SIMULATOR',
131
136
  description: "Enabling this option will configure the Simulator's system language",
@@ -84,6 +84,10 @@ module Snapshot
84
84
  {
85
85
  # snapshot in Xcode 9 saves screenshots with the SIMULATOR_DEVICE_NAME
86
86
  # which includes spaces
87
+ 'iPhone 12 Pro Max' => "iPhone 12 Pro Max",
88
+ 'iPhone 12 Pro' => "iPhone 12 Pro",
89
+ 'iPhone 12 mini' => "iPhone 12 mini",
90
+ 'iPhone 12' => "iPhone 12",
87
91
  'iPhone 11 Pro Max' => "iPhone 11 Pro Max",
88
92
  'iPhone 11 Pro' => "iPhone 11 Pro",
89
93
  'iPhone 11' => "iPhone 11",
@@ -14,6 +14,7 @@ module Snapshot
14
14
  attr_accessor :app_identifier
15
15
  attr_accessor :disable_slide_to_type
16
16
  attr_accessor :override_status_bar
17
+ attr_accessor :override_status_bar_arguments
17
18
 
18
19
  # xcode 8
19
20
  attr_accessor :number_of_retries
@@ -47,6 +48,7 @@ module Snapshot
47
48
  @concurrent_simulators = snapshot_config[:concurrent_simulators]
48
49
  @disable_slide_to_type = snapshot_config[:disable_slide_to_type]
49
50
  @override_status_bar = snapshot_config[:override_status_bar]
51
+ @override_status_bar_arguments = snapshot_config[:override_status_bar_arguments]
50
52
 
51
53
  launch_arguments = Array(snapshot_config[:launch_arguments])
52
54
  # if more than 1 set of arguments, use a tuple with an index
@@ -89,7 +89,7 @@ module Snapshot
89
89
  log_path: xcodebuild_log_path(language: language, locale: locale)
90
90
  )
91
91
 
92
- devices.each { |device_type| override_status_bar(device_type) } if launcher_config.override_status_bar
92
+ devices.each { |device_type| override_status_bar(device_type, launcher_config.override_status_bar_arguments) } if launcher_config.override_status_bar
93
93
 
94
94
  UI.important("Running snapshot on: #{devices.join(', ')}")
95
95
 
@@ -112,7 +112,7 @@ module Snapshot
112
112
  end
113
113
  end
114
114
 
115
- def override_status_bar(device_type)
115
+ def override_status_bar(device_type, arguments = nil)
116
116
  device_udid = TestCommandGenerator.device_udid(device_type)
117
117
 
118
118
  UI.message("Launch Simulator #{device_type}")
@@ -120,9 +120,13 @@ module Snapshot
120
120
 
121
121
  UI.message("Overriding Status Bar")
122
122
 
123
- # The time needs to be passed as ISO8601 so the simulator formats it correctly
124
- time = Time.new(2007, 1, 9, 9, 41, 0)
125
- Helper.backticks("xcrun simctl status_bar #{device_udid} override --time #{time.iso8601} --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100 &> /dev/null")
123
+ if arguments.nil? || arguments.empty?
124
+ # The time needs to be passed as ISO8601 so the simulator formats it correctly
125
+ time = Time.new(2007, 1, 9, 9, 41, 0)
126
+ arguments = "--time #{time.iso8601} --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100"
127
+ end
128
+
129
+ Helper.backticks("xcrun simctl status_bar #{device_udid} override #{arguments} &> /dev/null")
126
130
  end
127
131
 
128
132
  def clear_status_bar(device_type)
data/spaceship/README.md CHANGED
@@ -111,21 +111,11 @@ When your Apple account has 2 factor verification enabled, you'll automatically
111
111
 
112
112
  #### Web sessions
113
113
 
114
- To generate a web session for your CI machine, use
115
-
116
- ```sh
117
- fastlane spaceauth -u user@example.org
118
- ```
119
-
120
- This will authenticate you and provide a string that can be transferred to your CI system. Copy everything from `---\n` to your CI server and provide it as environment variable named `FASTLANE_SESSION`. For example:
121
-
122
- ```
123
- export FASTLANE_SESSION='---\n- !ruby/object:HTTP::Cookie\n name: DES5c148586dfd451e55afbaaa5f62418f91\n value: HSARMTKNSRVTWFla1+yO4gVPowH17VaaaxPFnUdMUegQZxqy1Ie1c2v6bM1vSOzIbuOmrl/FNenlScsd/NbF7/Lw4cpnL15jsyg0TOJwP32tC/NguPiyOaaaU+jrj4tf4uKdIywVaaaFSRVT\n domain: idmsa.apple.com\n for_domain: true\n path: "/"\n secure: true\n httponly: true\n expires: 2016-04-27 23:55:56.000000000 Z\n max_age: \n created_at: 2016-03-28 16:55:57.032086000 -07:00\n accessed_at: 2016-03-28 19:11:17.828141000 -07:00\n'
124
- ```
114
+ See [Best Practices > Continuous Integration > Authenticating with Apple services > Method 2: Two-step or two-factor authentication > Storing a manually verified session using spaceauth](https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth)
125
115
 
126
116
  #### Transporter
127
117
 
128
- See [Continuous Integration > Authentication with Apple services > Application specific passwords](https://docs.fastlane.tools/best-practices/continuous-integration/#application-specific-passwords)
118
+ See [Best Practices > Continuous Integration > Authenticating with Apple services > Method 3: Application-specific passwords](https://docs.fastlane.tools/best-practices/continuous-integration/#method-3-application-specific-passwords)
129
119
 
130
120
  ## _spaceship_ in use
131
121
 
@@ -89,12 +89,12 @@ module Spaceship
89
89
  ##
90
90
  # Sets client and returns self for chaining.
91
91
  # @return (Spaceship::Base)
92
- # rubocop:disable Style/AccessorMethodName
92
+ # rubocop:disable Naming/AccessorMethodName
93
93
  def set_client(client)
94
94
  self.client = client
95
95
  self
96
96
  end
97
- # rubocop:enable Style/AccessorMethodName
97
+ # rubocop:enable Naming/AccessorMethodName
98
98
 
99
99
  ##
100
100
  # Binds attributes getters and setters to underlying data returned from the API.
@@ -3,6 +3,7 @@ require 'highline'
3
3
  HighLine.track_eof = false
4
4
 
5
5
  require 'fastlane/version'
6
+ require 'fastlane_core/ui/help_formatter'
6
7
  require_relative 'playground'
7
8
  require_relative 'spaceauth_runner'
8
9
 
@@ -21,7 +22,7 @@ module Spaceship
21
22
  program :help, 'Author', 'Felix Krause <spaceship@krausefx.com>'
22
23
  program :help, 'Website', 'https://fastlane.tools'
23
24
  program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/spaceship'
24
- program :help_formatter, :compact
25
+ program :help_formatter, FastlaneCore::HelpFormatter
25
26
 
26
27
  global_option('-u', '--user USERNAME', 'Specify the Apple ID you want to log in with')
27
28
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
@@ -39,9 +40,10 @@ module Spaceship
39
40
  command :spaceauth do |c|
40
41
  c.syntax = 'fastlane spaceship spaceauth'
41
42
  c.description = 'Authentication helper for spaceship/fastlane to work with Apple 2-Step/2FA'
43
+ c.option('--copy_to_clipboard', 'Whether the session string should be copied to clipboard. For more info see https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth`')
42
44
 
43
45
  c.action do |args, options|
44
- Spaceship::SpaceauthRunner.new(username: options.user).run
46
+ Spaceship::SpaceauthRunner.new(username: options.user, copy_to_clipboard: options.copy_to_clipboard).run
45
47
  end
46
48
  end
47
49
 
@@ -30,7 +30,7 @@ module Spaceship
30
30
  # Creates alias for :minOsVersion to :min_os_version
31
31
  #
32
32
  def attr_mapping(attr_map)
33
- self.reverse_attr_map ||= attr_map.invert.each_with_object({}) { |(k, v), memo| memo[k.to_sym] = v; }
33
+ self.reverse_attr_map ||= attr_map.invert.transform_keys(&:to_sym)
34
34
  attr_map.each do |key, value|
35
35
  # Actual
36
36
  reader = value.to_sym
@@ -92,6 +92,12 @@ module Spaceship
92
92
  return resps.flat_map(&:to_models)
93
93
  end
94
94
 
95
+ def fetch_all_certificates(client: nil, filter: {}, includes: nil, sort: nil)
96
+ client ||= Spaceship::ConnectAPI
97
+ resps = client.get_certificates(profile_id: id, filter: filter, includes: includes).all_pages
98
+ return resps.flat_map(&:to_models)
99
+ end
100
+
95
101
  def delete!(client: nil)
96
102
  client ||= Spaceship::ConnectAPI
97
103
  return client.delete_profile(profile_id: id)
@@ -84,9 +84,13 @@ module Spaceship
84
84
  # certificates
85
85
  #
86
86
 
87
- def get_certificates(filter: {}, includes: nil, limit: nil, sort: nil)
87
+ def get_certificates(profile_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
88
88
  params = provisioning_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
89
- provisioning_request_client.get("certificates", params)
89
+ if profile_id.nil?
90
+ provisioning_request_client.get("certificates", params)
91
+ else
92
+ provisioning_request_client.get("profiles/#{profile_id}/certificates", params)
93
+ end
90
94
  end
91
95
 
92
96
  def get_certificate(certificate_id: nil, includes: nil)
@@ -1,15 +1,17 @@
1
1
  require 'colored'
2
2
  require 'credentials_manager/appfile_config'
3
3
  require 'yaml'
4
+ require 'fastlane_core'
4
5
 
5
6
  require_relative 'tunes/tunes_client'
6
7
 
7
8
  module Spaceship
8
9
  class SpaceauthRunner
9
- def initialize(username: nil)
10
+ def initialize(username: nil, copy_to_clipboard: nil)
10
11
  @username = username
11
12
  @username ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
12
13
  @username ||= ask("Username: ")
14
+ @copy_to_clipboard = copy_to_clipboard
13
15
  end
14
16
 
15
17
  def run
@@ -22,7 +24,7 @@ module Spaceship
22
24
  puts("Could not login to App Store Connect".red)
23
25
  puts("Please check your credentials and try again.".yellow)
24
26
  puts("This could be an issue with App Store Connect,".yellow)
25
- puts("Please try unsetting the FASTLANE_SESSION environment variable".yellow)
27
+ puts("Please try unsetting the FASTLANE_SESSION environment variable by calling 'unset FASTLANE_SESSION'".yellow)
26
28
  puts("(if it is set) and re-run `fastlane spaceauth`".yellow)
27
29
  puts("")
28
30
  puts("Exception type: #{ex.class}")
@@ -49,22 +51,30 @@ module Spaceship
49
51
  cookie.name.start_with?("myacinfo") || cookie.name == "dqsid" || cookie.name.start_with?("DES")
50
52
  end
51
53
 
52
- yaml = cookies.to_yaml.gsub("\n", "\\n")
54
+ @yaml = cookies.to_yaml.gsub("\n", "\\n")
53
55
 
54
56
  puts("---")
55
57
  puts("")
56
58
  puts("Pass the following via the FASTLANE_SESSION environment variable:")
57
- puts(yaml.cyan.underline)
59
+ puts(@yaml.cyan.underline)
58
60
  puts("")
59
61
  puts("")
60
62
  puts("Example:")
61
- puts("export FASTLANE_SESSION='#{yaml}'".cyan.underline)
63
+ puts("export FASTLANE_SESSION='#{@yaml}'".cyan.underline)
62
64
 
63
- if mac? && Spaceship::Client::UserInterface.interactive? && agree("🙄 Should fastlane copy the cookie into your clipboard, so you can easily paste it? (y/n)", true)
64
- require 'open3'
65
- Open3.popen3('pbcopy') { |input, _, _| input << yaml }
66
- puts("Successfully copied text into your clipboard 🎨".green)
65
+ if @copy_to_clipboard == false
66
+ puts("Skipped asking to copy the session string into your clipboard ⏭️".green)
67
+ elsif @copy_to_clipboard || (mac? && Spaceship::Client::UserInterface.interactive? && agree("🙄 Should fastlane copy the cookie into your clipboard, so you can easily paste it? (y/n)", true))
68
+ FastlaneCore::Clipboard.copy(content: @yaml)
69
+ puts("Successfully copied the session string into your clipboard 🎨".green)
67
70
  end
71
+
72
+ return self
73
+ end
74
+
75
+ def session_string
76
+ FastlaneCore::UI.user_error!("`#{__method__}` method called before calling `run` in `SpaceauthRunner`") unless @yaml
77
+ @yaml
68
78
  end
69
79
 
70
80
  def mac?
@@ -15,7 +15,7 @@ module Spaceship
15
15
 
16
16
  def find(email)
17
17
  all.each do |member|
18
- if member.email_address == email
18
+ if member.email_address.casecmp?(email)
19
19
  return member
20
20
  end
21
21
  end
@@ -18,10 +18,10 @@ module Spaceship
18
18
  end
19
19
 
20
20
  # Public getter for all UI related code
21
- # rubocop:disable Style/MethodName
21
+ # rubocop:disable Naming/MethodName
22
22
  def UI
23
23
  UserInterface.new(self)
24
24
  end
25
- # rubocop:enable Style/MethodName
25
+ # rubocop:enable Naming/MethodName
26
26
  end
27
27
  end
Binary file
Binary file
Binary file
@@ -279,7 +279,7 @@ module Supply
279
279
  def update_listing_for_language(language: nil, title: nil, short_description: nil, full_description: nil, video: nil)
280
280
  ensure_active_edit!
281
281
 
282
- listing = AndroidPublisher::Listing.new({
282
+ listing = AndroidPublisher::Listing.new(**{
283
283
  language: language,
284
284
  title: title,
285
285
  full_description: full_description,
@@ -327,12 +327,14 @@ module Supply
327
327
  def upload_mapping(path_to_mapping, apk_version_code)
328
328
  ensure_active_edit!
329
329
 
330
+ extension = File.extname(path_to_mapping).downcase
331
+
330
332
  call_google_api do
331
333
  client.upload_edit_deobfuscationfile(
332
334
  current_package_name,
333
335
  current_edit.id,
334
336
  apk_version_code,
335
- "proguard",
337
+ extension == ".zip" ? "nativeCode" : "proguard",
336
338
  upload_source: path_to_mapping,
337
339
  content_type: "application/octet-stream"
338
340
  )
@@ -1,5 +1,6 @@
1
1
  require "commander"
2
2
  require "fastlane_core"
3
+ require 'fastlane_core/ui/help_formatter'
3
4
  require "supply"
4
5
 
5
6
  HighLine.track_eof = false
@@ -19,7 +20,7 @@ module Supply
19
20
  program :help, 'Author', 'Felix Krause <supply@krausefx.com>'
20
21
  program :help, 'Website', 'https://fastlane.tools'
21
22
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/supply/'
22
- program :help_formatter, :compact
23
+ program :help_formatter, FastlaneCore::HelpFormatter
23
24
 
24
25
  always_trace!
25
26
 
@@ -223,7 +223,7 @@ module Supply
223
223
  default_value: false),
224
224
  FastlaneCore::ConfigItem.new(key: :mapping,
225
225
  env_name: "SUPPLY_MAPPING",
226
- description: "Path to the mapping file to upload",
226
+ description: "Path to the mapping file to upload (mapping.txt or native-debug-symbols.zip alike)",
227
227
  short_option: "-d",
228
228
  conflicting_options: [:mapping_paths],
229
229
  optional: true,
@@ -235,7 +235,7 @@ module Supply
235
235
  conflicting_options: [:mapping],
236
236
  optional: true,
237
237
  type: Array,
238
- description: "An array of paths to mapping files to upload",
238
+ description: "An array of paths to mapping files to upload (mapping.txt or native-debug-symbols.zip alike)",
239
239
  short_option: "-s",
240
240
  verify_block: proc do |value|
241
241
  UI.user_error!("Could not evaluate array from '#{value}'") unless value.kind_of?(Array)
@@ -304,6 +304,7 @@ module Supply
304
304
  mapping_paths = [Supply.config[:mapping]] unless (mapping_paths = Supply.config[:mapping_paths])
305
305
  mapping_paths.zip(apk_version_codes).each do |mapping_path, version_code|
306
306
  if mapping_path
307
+ UI.message("Preparing mapping at path '#{mapping_path}', version code #{version_code} for upload...")
307
308
  client.upload_mapping(mapping_path, version_code)
308
309
  end
309
310
  end
metadata CHANGED
@@ -1,58 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.180.0
4
+ version: 2.183.1
5
5
  platform: ruby
6
6
  authors:
7
- - Jimmy Dee
8
- - Roger Oba
9
- - Daniel Jankowski
10
7
  - Satoshi Namai
8
+ - Andrew McBurney
9
+ - Maksym Grebenets
10
+ - Helmut Januschka
11
+ - Kohki Miki
12
+ - Roger Oba
13
+ - Jimmy Dee
14
+ - Aaron Brager
15
+ - Jorge Revuelta H
16
+ - Jérôme Lacoste
11
17
  - Joshua Liebowitz
12
18
  - Max Ott
13
- - Manu Wallner
14
19
  - Felix Krause
20
+ - Stefan Natchev
21
+ - Manu Wallner
15
22
  - Fumiya Nakamura
16
- - Aaron Brager
17
- - Maksym Grebenets
18
- - Jorge Revuelta H
19
- - Helmut Januschka
23
+ - Danielle Tomlinson
24
+ - Luka Mirosevic
25
+ - Josh Holtz
26
+ - Daniel Jankowski
20
27
  - Olivier Halligon
21
28
  - Iulian Onofrei
22
- - Stefan Natchev
23
- - Andrew McBurney
24
- - Josh Holtz
25
- - Danielle Tomlinson
26
- - Kohki Miki
27
29
  - Jan Piotrowski
28
- - Jérôme Lacoste
29
- - Luka Mirosevic
30
30
  - Matthew Ellis
31
31
  autorequire:
32
32
  bindir: bin
33
33
  cert_chain: []
34
- date: 2021-04-08 00:00:00.000000000 Z
34
+ date: 2021-05-17 00:00:00.000000000 Z
35
35
  dependencies:
36
- - !ruby/object:Gem::Dependency
37
- name: slack-notifier
38
- requirement: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 2.0.0
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 3.0.0
46
- type: :runtime
47
- prerelease: false
48
- version_requirements: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 2.0.0
53
- - - "<"
54
- - !ruby/object:Gem::Version
55
- version: 3.0.0
56
36
  - !ruby/object:Gem::Dependency
57
37
  name: xcodeproj
58
38
  requirement: !ruby/object:Gem::Requirement
@@ -304,25 +284,19 @@ dependencies:
304
284
  - !ruby/object:Gem::Version
305
285
  version: '0'
306
286
  - !ruby/object:Gem::Dependency
307
- name: commander-fastlane
287
+ name: commander
308
288
  requirement: !ruby/object:Gem::Requirement
309
289
  requirements:
310
- - - ">="
311
- - !ruby/object:Gem::Version
312
- version: 4.4.6
313
- - - "<"
290
+ - - "~>"
314
291
  - !ruby/object:Gem::Version
315
- version: 5.0.0
292
+ version: '4.6'
316
293
  type: :runtime
317
294
  prerelease: false
318
295
  version_requirements: !ruby/object:Gem::Requirement
319
296
  requirements:
320
- - - ">="
321
- - !ruby/object:Gem::Version
322
- version: 4.4.6
323
- - - "<"
297
+ - - "~>"
324
298
  - !ruby/object:Gem::Version
325
- version: 5.0.0
299
+ version: '4.6'
326
300
  - !ruby/object:Gem::Dependency
327
301
  name: excon
328
302
  requirement: !ruby/object:Gem::Requirement
@@ -429,22 +403,16 @@ dependencies:
429
403
  name: highline
430
404
  requirement: !ruby/object:Gem::Requirement
431
405
  requirements:
432
- - - ">="
433
- - !ruby/object:Gem::Version
434
- version: 1.7.2
435
- - - "<"
406
+ - - "~>"
436
407
  - !ruby/object:Gem::Version
437
- version: 2.0.0
408
+ version: '2.0'
438
409
  type: :runtime
439
410
  prerelease: false
440
411
  version_requirements: !ruby/object:Gem::Requirement
441
412
  requirements:
442
- - - ">="
443
- - !ruby/object:Gem::Version
444
- version: 1.7.2
445
- - - "<"
413
+ - - "~>"
446
414
  - !ruby/object:Gem::Version
447
- version: 2.0.0
415
+ version: '2.0'
448
416
  - !ruby/object:Gem::Dependency
449
417
  name: json
450
418
  requirement: !ruby/object:Gem::Requirement
@@ -616,45 +584,47 @@ dependencies:
616
584
  - !ruby/object:Gem::Version
617
585
  version: '3'
618
586
  - !ruby/object:Gem::Dependency
619
- name: google-api-client
587
+ name: google-apis-playcustomapp_v1
620
588
  requirement: !ruby/object:Gem::Requirement
621
589
  requirements:
622
- - - ">="
623
- - !ruby/object:Gem::Version
624
- version: 0.37.0
625
- - - "<"
590
+ - - "~>"
626
591
  - !ruby/object:Gem::Version
627
- version: 0.39.0
592
+ version: '0.1'
628
593
  type: :runtime
629
594
  prerelease: false
630
595
  version_requirements: !ruby/object:Gem::Requirement
631
596
  requirements:
632
- - - ">="
597
+ - - "~>"
633
598
  - !ruby/object:Gem::Version
634
- version: 0.37.0
635
- - - "<"
599
+ version: '0.1'
600
+ - !ruby/object:Gem::Dependency
601
+ name: google-apis-androidpublisher_v3
602
+ requirement: !ruby/object:Gem::Requirement
603
+ requirements:
604
+ - - "~>"
636
605
  - !ruby/object:Gem::Version
637
- version: 0.39.0
606
+ version: '0.1'
607
+ type: :runtime
608
+ prerelease: false
609
+ version_requirements: !ruby/object:Gem::Requirement
610
+ requirements:
611
+ - - "~>"
612
+ - !ruby/object:Gem::Version
613
+ version: '0.1'
638
614
  - !ruby/object:Gem::Dependency
639
615
  name: google-cloud-storage
640
616
  requirement: !ruby/object:Gem::Requirement
641
617
  requirements:
642
- - - ">="
643
- - !ruby/object:Gem::Version
644
- version: 1.15.0
645
- - - "<"
618
+ - - "~>"
646
619
  - !ruby/object:Gem::Version
647
- version: 2.0.0
620
+ version: '1.31'
648
621
  type: :runtime
649
622
  prerelease: false
650
623
  version_requirements: !ruby/object:Gem::Requirement
651
624
  requirements:
652
- - - ">="
653
- - !ruby/object:Gem::Version
654
- version: 1.15.0
655
- - - "<"
625
+ - - "~>"
656
626
  - !ruby/object:Gem::Version
657
- version: 2.0.0
627
+ version: '1.31'
658
628
  - !ruby/object:Gem::Dependency
659
629
  name: emoji_regex
660
630
  requirement: !ruby/object:Gem::Requirement
@@ -835,28 +805,42 @@ dependencies:
835
805
  requirements:
836
806
  - - '='
837
807
  - !ruby/object:Gem::Version
838
- version: 0.49.1
808
+ version: 1.12.1
839
809
  type: :development
840
810
  prerelease: false
841
811
  version_requirements: !ruby/object:Gem::Requirement
842
812
  requirements:
843
813
  - - '='
844
814
  - !ruby/object:Gem::Version
845
- version: 0.49.1
815
+ version: 1.12.1
816
+ - !ruby/object:Gem::Dependency
817
+ name: rubocop-performance
818
+ requirement: !ruby/object:Gem::Requirement
819
+ requirements:
820
+ - - ">="
821
+ - !ruby/object:Gem::Version
822
+ version: '0'
823
+ type: :development
824
+ prerelease: false
825
+ version_requirements: !ruby/object:Gem::Requirement
826
+ requirements:
827
+ - - ">="
828
+ - !ruby/object:Gem::Version
829
+ version: '0'
846
830
  - !ruby/object:Gem::Dependency
847
831
  name: rubocop-require_tools
848
832
  requirement: !ruby/object:Gem::Requirement
849
833
  requirements:
850
834
  - - ">="
851
835
  - !ruby/object:Gem::Version
852
- version: 0.1.2
836
+ version: '0'
853
837
  type: :development
854
838
  prerelease: false
855
839
  version_requirements: !ruby/object:Gem::Requirement
856
840
  requirements:
857
841
  - - ">="
858
842
  - !ruby/object:Gem::Version
859
- version: 0.1.2
843
+ version: '0'
860
844
  - !ruby/object:Gem::Dependency
861
845
  name: rb-readline
862
846
  requirement: !ruby/object:Gem::Requirement
@@ -1296,6 +1280,7 @@ files:
1296
1280
  - fastlane/lib/fastlane/lane_manager_base.rb
1297
1281
  - fastlane/lib/fastlane/markdown_table_formatter.rb
1298
1282
  - fastlane/lib/fastlane/new_action.rb
1283
+ - fastlane/lib/fastlane/notification/slack.rb
1299
1284
  - fastlane/lib/fastlane/one_off.rb
1300
1285
  - fastlane/lib/fastlane/other_action.rb
1301
1286
  - fastlane/lib/fastlane/plugins/plugin_fetcher.rb
@@ -1365,6 +1350,7 @@ files:
1365
1350
  - fastlane/swift/MainProcess.swift
1366
1351
  - fastlane/swift/Matchfile.swift
1367
1352
  - fastlane/swift/MatchfileProtocol.swift
1353
+ - fastlane/swift/OptionalConfigValue.swift
1368
1354
  - fastlane/swift/Plugins.swift
1369
1355
  - fastlane/swift/Precheckfile.swift
1370
1356
  - fastlane/swift/PrecheckfileProtocol.swift
@@ -1398,6 +1384,7 @@ files:
1398
1384
  - fastlane_core/lib/fastlane_core/android_package_name_guesser.rb
1399
1385
  - fastlane_core/lib/fastlane_core/build_watcher.rb
1400
1386
  - fastlane_core/lib/fastlane_core/cert_checker.rb
1387
+ - fastlane_core/lib/fastlane_core/clipboard.rb
1401
1388
  - fastlane_core/lib/fastlane_core/command_executor.rb
1402
1389
  - fastlane_core/lib/fastlane_core/configuration/commander_generator.rb
1403
1390
  - fastlane_core/lib/fastlane_core/configuration/config_item.rb
@@ -1440,6 +1427,8 @@ files:
1440
1427
  - fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb
1441
1428
  - fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb
1442
1429
  - fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb
1430
+ - fastlane_core/lib/fastlane_core/ui/help.erb
1431
+ - fastlane_core/lib/fastlane_core/ui/help_formatter.rb
1443
1432
  - fastlane_core/lib/fastlane_core/ui/implementations/shell.rb
1444
1433
  - fastlane_core/lib/fastlane_core/ui/interface.rb
1445
1434
  - fastlane_core/lib/fastlane_core/ui/ui.rb
@@ -1528,7 +1517,6 @@ files:
1528
1517
  - pilot/lib/pilot/tester_exporter.rb
1529
1518
  - pilot/lib/pilot/tester_importer.rb
1530
1519
  - pilot/lib/pilot/tester_manager.rb
1531
- - pilot/lib/pilot/tester_util.rb
1532
1520
  - precheck/README.md
1533
1521
  - precheck/lib/assets/PrecheckfileTemplate
1534
1522
  - precheck/lib/assets/PrecheckfileTemplate.swift
@@ -1825,6 +1813,9 @@ files:
1825
1813
  - spaceship/lib/spaceship/upgrade_2fa_later_client.rb
1826
1814
  - supply/README.md
1827
1815
  - supply/lib/supply.rb
1816
+ - supply/lib/supply/.client.rb.swp
1817
+ - supply/lib/supply/.listing.rb.swp
1818
+ - supply/lib/supply/.uploader.rb.swp
1828
1819
  - supply/lib/supply/apk_listing.rb
1829
1820
  - supply/lib/supply/client.rb
1830
1821
  - supply/lib/supply/commands_generator.rb
@@ -1865,7 +1856,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1865
1856
  requirements:
1866
1857
  - - ">="
1867
1858
  - !ruby/object:Gem::Version
1868
- version: '2.4'
1859
+ version: '2.5'
1869
1860
  required_rubygems_version: !ruby/object:Gem::Requirement
1870
1861
  requirements:
1871
1862
  - - ">="