fastlane 2.236.1 → 2.238.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +109 -102
  3. data/deliver/lib/deliver/options.rb +1 -1
  4. data/fastlane/lib/fastlane/actions/deploygate.rb +3 -2
  5. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +7 -3
  6. data/fastlane/lib/fastlane/actions/hockey.rb +3 -2
  7. data/fastlane/lib/fastlane/actions/installr.rb +3 -2
  8. data/fastlane/lib/fastlane/actions/mailgun.rb +1 -0
  9. data/fastlane/lib/fastlane/actions/notarize.rb +3 -18
  10. data/fastlane/lib/fastlane/actions/register_devices.rb +21 -5
  11. data/fastlane/lib/fastlane/actions/setup_ci.rb +7 -2
  12. data/fastlane/lib/fastlane/actions/spm.rb +6 -0
  13. data/fastlane/lib/fastlane/actions/swiftlint.rb +10 -1
  14. data/fastlane/lib/fastlane/actions/testfairy.rb +5 -3
  15. data/fastlane/lib/fastlane/actions/tryouts.rb +3 -2
  16. data/fastlane/lib/fastlane/actions/update_project_team.rb +17 -9
  17. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +33 -7
  18. data/fastlane/lib/fastlane/helper/sh_helper.rb +7 -3
  19. data/fastlane/lib/fastlane/lane_manager.rb +0 -1
  20. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +0 -7
  21. data/fastlane/lib/fastlane/plugins/template/.gitignore +0 -1
  22. data/fastlane/lib/fastlane/plugins/template/.rspec +0 -2
  23. data/fastlane/lib/fastlane/plugins/template/Gemfile.erb +0 -2
  24. data/fastlane/lib/fastlane/version.rb +1 -1
  25. data/fastlane/swift/Deliverfile.swift +1 -1
  26. data/fastlane/swift/DeliverfileProtocol.swift +2 -2
  27. data/fastlane/swift/Fastlane.swift +50 -20
  28. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +1 -1
  29. data/fastlane/swift/Gymfile.swift +1 -1
  30. data/fastlane/swift/GymfileProtocol.swift +1 -1
  31. data/fastlane/swift/Matchfile.swift +1 -1
  32. data/fastlane/swift/MatchfileProtocol.swift +8 -1
  33. data/fastlane/swift/Precheckfile.swift +1 -1
  34. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  35. data/fastlane/swift/Scanfile.swift +1 -1
  36. data/fastlane/swift/ScanfileProtocol.swift +8 -1
  37. data/fastlane/swift/Screengrabfile.swift +1 -1
  38. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  39. data/fastlane/swift/Snapshotfile.swift +1 -1
  40. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  41. data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +31 -5
  42. data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +24 -12
  43. data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +22 -12
  44. data/fastlane_core/lib/fastlane_core/cert_checker.rb +22 -9
  45. data/fastlane_core/lib/fastlane_core/helper.rb +4 -3
  46. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +6 -2
  47. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -1
  48. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  49. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +1 -1
  50. data/fastlane_core/lib/fastlane_core/print_table.rb +0 -16
  51. data/fastlane_core/lib/fastlane_core/project.rb +3 -1
  52. data/fastlane_core/lib/fastlane_core/queue_worker.rb +10 -1
  53. data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb +6 -0
  54. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +1 -1
  55. data/fastlane_core/lib/fastlane_core/video_utils.rb +4 -2
  56. data/gym/lib/gym/error_handler.rb +11 -1
  57. data/gym/lib/gym/generators/build_command_generator.rb +2 -0
  58. data/gym/lib/gym/module.rb +20 -2
  59. data/match/lib/match/options.rb +8 -0
  60. data/match/lib/match/runner.rb +4 -2
  61. data/match/lib/match/storage/git_storage.rb +18 -2
  62. data/pilot/lib/pilot/build_manager.rb +2 -2
  63. data/pilot/lib/pilot/options.rb +2 -2
  64. data/pilot/lib/pilot/tester_manager.rb +2 -2
  65. data/precheck/lib/precheck/rules/copyright_date_rule.rb +16 -10
  66. data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +2 -2
  67. data/scan/lib/scan/options.rb +5 -0
  68. data/scan/lib/scan/runner.rb +1 -0
  69. data/scan/lib/scan/test_command_generator.rb +2 -0
  70. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +4 -1
  71. data/spaceship/lib/spaceship/client.rb +0 -1
  72. data/spaceship/lib/spaceship/connect_api/file_uploader.rb +1 -1
  73. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +6 -0
  74. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +5 -0
  75. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +7 -2
  76. data/spaceship/lib/spaceship/helper/plist_middleware.rb +37 -8
  77. data/supply/lib/supply/uploader.rb +7 -1
  78. data/trainer/lib/trainer/xcresult/test_case.rb +21 -2
  79. data/trainer/lib/trainer/xcresult/test_plan.rb +3 -3
  80. data/trainer/lib/trainer/xcresult/test_suite.rb +28 -19
  81. metadata +74 -32
@@ -24,14 +24,15 @@ module Fastlane
24
24
 
25
25
  def self.upload_build(params)
26
26
  require 'faraday'
27
- require 'faraday_middleware'
27
+ require 'faraday/multipart'
28
+ require 'faraday/follow_redirects'
28
29
 
29
30
  url = TRYOUTS_API_BUILD_RELEASE_TEMPLATE % params[:app_id]
30
31
  connection = Faraday.new(url) do |builder|
31
32
  builder.request(:multipart)
32
33
  builder.request(:url_encoded)
33
34
  builder.response(:json, content_type: /\bjson$/)
34
- builder.use(FaradayMiddleware::FollowRedirects)
35
+ builder.response(:follow_redirects)
35
36
  builder.adapter(:net_http)
36
37
  end
37
38
 
@@ -8,10 +8,8 @@ module Fastlane
8
8
  project_path = params[:path]
9
9
  selected_targets = params[:targets]
10
10
 
11
- UI.user_error!("Could not find path to xcodeproj '#{project_path}'. Pass the path to your project (not workspace)!") unless File.exist?(project_path)
12
-
13
11
  # Load .xcodeproj
14
- project = Xcodeproj::Project.open(project_path)
12
+ project = Fastlane::Helper::XcodeprojHelper.get_project!(project_path)
15
13
 
16
14
  # Fetch target
17
15
  targets = project.native_targets
@@ -25,10 +23,20 @@ module Fastlane
25
23
 
26
24
  # Set teamid in target
27
25
  targets.each do |target|
28
- UI.message("Updating development team (#{params[:teamid]}) for target `#{target.name}` in the project '#{project_path}'")
29
- # Update the build settings
30
26
  target.build_configurations.each do |configuration|
31
- configuration.build_settings['DEVELOPMENT_TEAM'] = params[:teamid]
27
+ # Iterate over any keys that start with DEVELOPMENT_TEAM
28
+ # This will also set keys that have filtering like [sdk=iphoneos*]
29
+ keys = configuration.build_settings.keys.select { |key| key.to_s.start_with?("DEVELOPMENT_TEAM") }
30
+ keys.each do |key|
31
+ configuration.build_settings[key] = params[:teamid]
32
+ UI.message("Updated build setting '#{key}' to '#{params[:teamid]}' for configuration '#{configuration.name}'")
33
+ end
34
+
35
+ # Explicitly set the key with value if keys don't exist
36
+ unless keys.include?('DEVELOPMENT_TEAM')
37
+ configuration.build_settings['DEVELOPMENT_TEAM'] = params[:teamid]
38
+ UI.message("Added build setting 'DEVELOPMENT_TEAM' with value '#{params[:teamid]}' for configuration '#{configuration.name}'")
39
+ end
32
40
  end
33
41
 
34
42
  project.save
@@ -42,7 +50,7 @@ module Fastlane
42
50
  end
43
51
 
44
52
  def self.details
45
- "This action updates the Developer Team ID of your Xcode project."
53
+ "This action updates (or adds) the Developer Team ID of your Xcode project."
46
54
  end
47
55
 
48
56
  def self.available_options
@@ -69,8 +77,8 @@ module Fastlane
69
77
  ]
70
78
  end
71
79
 
72
- def self.author
73
- "lgaches"
80
+ def self.authors
81
+ ["lgaches", "iBotPeaches"]
74
82
  end
75
83
 
76
84
  def self.is_supported?(platform)
@@ -36,20 +36,29 @@ module Fastlane
36
36
  end
37
37
 
38
38
  worker = FastlaneCore::QueueWorker.new(max_worker_threads) do |dsym_path|
39
- handle_dsym(params, dsym_path, max_worker_threads)
39
+ handle_dsym(params, dsym_path)
40
40
  end
41
41
  worker.batch_enqueue(dsym_paths)
42
- worker.start
43
- UI.success("Successfully uploaded dSYM files to Crashlytics 💯")
42
+ results = worker.start
43
+
44
+ if results.all?
45
+ UI.success("Successfully uploaded dSYM files to Crashlytics 💯")
46
+ elsif results.any?
47
+ UI.success("Successfully uploaded some dSYM files to Crashlytics 💯")
48
+ UI.important("Some dSYM files failed to upload, see the errors above")
49
+ else
50
+ UI.user_error!("Service failed to upload any dSYM files to Crashlytics")
51
+ end
44
52
  end
45
53
 
46
54
  # @param current_path this is a path to either a dSYM or a zipped dSYM
47
55
  # this might also be either nested or not, we're flexible
48
- def self.handle_dsym(params, current_path, max_worker_threads)
56
+ def self.handle_dsym(params, current_path)
49
57
  if current_path.end_with?(".dSYM", ".zip")
50
- upload_dsym(params, current_path)
58
+ return upload_dsym(params, current_path)
51
59
  else
52
60
  UI.error("Don't know how to handle '#{current_path}'")
61
+ return false
53
62
  end
54
63
  end
55
64
 
@@ -69,12 +78,21 @@ module Fastlane
69
78
  end
70
79
  command << "-p #{params[:platform] == 'appletvos' ? 'tvos' : params[:platform]}"
71
80
  command << File.expand_path(path).shellescape
81
+
72
82
  begin
73
83
  command_to_execute = command.join(" ")
74
84
  UI.verbose("upload_dsym using command: #{command_to_execute}")
75
85
  Actions.sh(command_to_execute, log: params[:debug])
86
+ return true
76
87
  rescue => ex
77
- UI.error(ex.to_s) # it fails, however we don't want to fail everything just for this
88
+ # If it fails - emit the warning, then continue (or crash) depending on "fail_on_error"
89
+ UI.error(ex.to_s)
90
+
91
+ if params[:fail_on_error] == true
92
+ raise
93
+ end
94
+
95
+ return false
78
96
  end
79
97
  end
80
98
 
@@ -118,7 +136,10 @@ module Fastlane
118
136
  end
119
137
 
120
138
  def self.details
121
- "This action allows you to upload symbolication files to Crashlytics. It's extra useful if you use it to download the latest dSYM files from Apple when you use Bitcode. This action will not fail the build if one of the uploads failed. The reason for that is that sometimes some of dSYM files are invalid, and we don't want them to fail the complete build."
139
+ [
140
+ "This action allows you to upload symbolication files to Crashlytics. It's extra useful if you use it to download the latest dSYM files from Apple when you use Bitcode. This action will not fail the build if one of the uploads failed by default.",
141
+ "The reason for that is that sometimes some of dSYM files are invalid, and we don't want them to fail the complete build. However, fail_on_build parameter can be used to prevent this behavior."
142
+ ].join("\n")
122
143
  end
123
144
 
124
145
  def self.available_options
@@ -195,6 +216,11 @@ module Fastlane
195
216
  min_threads = 1
196
217
  UI.user_error!("Too few threads (#{value}) minimum number of threads: #{min_threads}") unless value >= min_threads
197
218
  end),
219
+ FastlaneCore::ConfigItem.new(key: :fail_on_error,
220
+ env_name: "FL_UPLOAD_SYMBOLS_TO_CRASHLYTICS_FAIL_ON_ERROR",
221
+ description: "Should the action fail when an upload fails?",
222
+ type: Boolean,
223
+ default_value: false),
198
224
  FastlaneCore::ConfigItem.new(key: :debug,
199
225
  env_name: "FL_UPLOAD_SYMBOLS_TO_CRASHLYTICS_DEBUG",
200
226
  description: "Enable debug mode for upload-symbols",
@@ -65,12 +65,16 @@ module Fastlane
65
65
  # with previous implementations of sh and... probably portable to all
66
66
  # relevant platforms.
67
67
  if exit_status.exitstatus != 0
68
+ # Due to some output and build systems having 30-80k lines of output.
69
+ # We will truncate what we will show to recap the failure.
70
+ truncated_msg = result.length > 500 ? result[-500..-1] : result
71
+
68
72
  message = if print_command
69
- "Exit status of command '#{shell_command}' was #{exit_status.exitstatus} instead of 0."
73
+ "Exit status of command '#{shell_command}' was #{exit_status.exitstatus} instead of 0.\n"
70
74
  else
71
- "Shell command exited with exit status #{exit_status.exitstatus} instead of 0."
75
+ "Shell command exited with exit status #{exit_status.exitstatus} instead of 0.\n"
72
76
  end
73
- message += "\n#{result}" if print_command_output
77
+ message += (truncated_msg).to_s if print_command_output && !$stdout.isatty
74
78
 
75
79
  if error_callback || block_given?
76
80
  UI.error(message)
@@ -55,7 +55,6 @@ module Fastlane
55
55
 
56
56
  print_lane_context
57
57
  print_error_line(ex)
58
- UI.error(ex.to_s) if ex.kind_of?(StandardError) # we don't want to print things like 'system exit'
59
58
  e = ex
60
59
  end
61
60
 
@@ -20,10 +20,3 @@ jobs:
20
20
 
21
21
  - name: Run tests
22
22
  run: bundle exec rake
23
-
24
- - name: Upload artifact
25
- uses: actions/upload-artifact@v5
26
- if: failure()
27
- with:
28
- name: test-results-ruby-${{ matrix.ruby-version }}
29
- path: test-results
@@ -9,4 +9,3 @@ Gemfile.lock
9
9
  fastlane/README.md
10
10
  fastlane/report.xml
11
11
  coverage
12
- test-results
@@ -1,5 +1,3 @@
1
1
  --require spec_helper
2
2
  --color
3
3
  --format d
4
- --format RspecJunitFormatter
5
- --out test-results/rspec/rspec.xml
@@ -10,8 +10,6 @@ gem 'pry'
10
10
  gem 'rake'
11
11
  # Behavior-driven testing tool for Ruby.
12
12
  gem 'rspec'
13
- # Formatter for RSpec to generate JUnit compatible reports.
14
- gem 'rspec_junit_formatter'
15
13
  # A Ruby static code analyzer and formatter.
16
14
  gem 'rubocop', '<%= Fastlane::RUBOCOP_REQUIREMENT %>'
17
15
  # A collection of RuboCop cops for performance optimizations.
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.236.1'.freeze
2
+ VERSION = '2.238.0'.freeze
3
3
  SUMMARY = "The easiest way to build and release mobile apps.".freeze
4
4
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
5
5
  MINIMUM_XCODE_RELEASE = "7.0".freeze
@@ -17,4 +17,4 @@ public class Deliverfile: DeliverfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.236.1
20
+ // Generated with fastlane 2.238.0
@@ -125,7 +125,7 @@ public protocol DeliverfileProtocol: AnyObject {
125
125
  /// The name of your Developer Portal team if you're in multiple teams
126
126
  var devPortalTeamName: String? { get }
127
127
 
128
- /// The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column
128
+ /// The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `xcrun iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column
129
129
  var itcProvider: String? { get }
130
130
 
131
131
  /// The provider public ID to be used with altool (--provider-public-id). This value will override the automatically detected provider value for altool uploads. Required after Xcode 26 when your account is associated with multiple providers and using username/app-password authentication
@@ -532,4 +532,4 @@ public extension DeliverfileProtocol {
532
532
 
533
533
  // Please don't remove the lines below
534
534
  // They are used to detect outdated files
535
- // FastlaneRunnerAPIVersion [0.9.150]
535
+ // FastlaneRunnerAPIVersion [0.9.152]