fastlane 2.138.0 → 2.143.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +75 -62
  4. data/cert/lib/cert/options.rb +12 -5
  5. data/cert/lib/cert/runner.rb +13 -0
  6. data/deliver/lib/deliver/options.rb +2 -2
  7. data/deliver/lib/deliver/runner.rb +13 -2
  8. data/deliver/lib/deliver/submit_for_review.rb +7 -1
  9. data/fastlane/lib/fastlane/action.rb +2 -2
  10. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  11. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  12. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  13. data/fastlane/lib/fastlane/actions/README.md +2 -0
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +13 -5
  15. data/fastlane/lib/fastlane/actions/build_app.rb +157 -6
  16. data/fastlane/lib/fastlane/actions/build_ios_app.rb +28 -132
  17. data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
  18. data/fastlane/lib/fastlane/actions/cocoapods.rb +2 -2
  19. data/fastlane/lib/fastlane/actions/create_pull_request.rb +71 -2
  20. data/fastlane/lib/fastlane/actions/docs/{build_ios_app.md → build_app.md} +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +22 -6
  22. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +20 -4
  23. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +10 -0
  24. data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +1 -1
  25. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +35 -7
  26. data/fastlane/lib/fastlane/actions/frame_screenshots.rb +2 -1
  27. data/fastlane/lib/fastlane/actions/get_github_release.rb +3 -0
  28. data/fastlane/lib/fastlane/actions/gradle.rb +43 -2
  29. data/fastlane/lib/fastlane/actions/gym.rb +3 -7
  30. data/fastlane/lib/fastlane/actions/import_from_git.rb +4 -0
  31. data/fastlane/lib/fastlane/actions/last_git_tag.rb +14 -5
  32. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +9 -3
  33. data/fastlane/lib/fastlane/actions/notarize.rb +183 -0
  34. data/fastlane/lib/fastlane/actions/run_tests.rb +5 -22
  35. data/fastlane/lib/fastlane/actions/s3.rb +5 -291
  36. data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
  37. data/fastlane/lib/fastlane/actions/setup_ci.rb +14 -8
  38. data/fastlane/lib/fastlane/actions/spm.rb +8 -0
  39. data/fastlane/lib/fastlane/actions/swiftlint.rb +17 -2
  40. data/fastlane/lib/fastlane/actions/update_plist.rb +37 -2
  41. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +13 -3
  42. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -0
  43. data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
  44. data/fastlane/lib/fastlane/fast_file.rb +13 -3
  45. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  46. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +56 -0
  47. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
  48. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
  49. data/fastlane/lib/fastlane/runner.rb +23 -18
  50. data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +1 -1
  51. data/fastlane/lib/fastlane/version.rb +1 -1
  52. data/fastlane/swift/Deliverfile.swift +1 -1
  53. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  54. data/fastlane/swift/Fastlane.swift +429 -50
  55. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  56. data/fastlane/swift/Gymfile.swift +1 -1
  57. data/fastlane/swift/GymfileProtocol.swift +17 -1
  58. data/fastlane/swift/Matchfile.swift +1 -1
  59. data/fastlane/swift/MatchfileProtocol.swift +23 -3
  60. data/fastlane/swift/Precheckfile.swift +1 -1
  61. data/fastlane/swift/RubyCommand.swift +1 -1
  62. data/fastlane/swift/Scanfile.swift +1 -1
  63. data/fastlane/swift/ScanfileProtocol.swift +21 -1
  64. data/fastlane/swift/Screengrabfile.swift +1 -1
  65. data/fastlane/swift/Snapshotfile.swift +1 -1
  66. data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
  67. data/fastlane_core/lib/fastlane_core/build_watcher.rb +6 -2
  68. data/fastlane_core/lib/fastlane_core/cert_checker.rb +28 -0
  69. data/fastlane_core/lib/fastlane_core/device_manager.rb +20 -0
  70. data/fastlane_core/lib/fastlane_core/helper.rb +7 -1
  71. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -0
  72. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +2 -0
  73. data/fastlane_core/lib/fastlane_core/project.rb +27 -0
  74. data/frameit/lib/frameit/commands_generator.rb +25 -0
  75. data/frameit/lib/frameit/config_parser.rb +31 -9
  76. data/frameit/lib/frameit/device.rb +90 -0
  77. data/frameit/lib/frameit/device_types.rb +121 -5
  78. data/frameit/lib/frameit/editor.rb +31 -40
  79. data/frameit/lib/frameit/offsets.rb +8 -1
  80. data/frameit/lib/frameit/options.rb +81 -54
  81. data/frameit/lib/frameit/runner.rb +17 -7
  82. data/frameit/lib/frameit/screenshot.rb +35 -47
  83. data/frameit/lib/frameit/template_finder.rb +15 -12
  84. data/gym/lib/gym/code_signing_mapping.rb +32 -3
  85. data/gym/lib/gym/detect_values.rb +34 -2
  86. data/gym/lib/gym/generators/build_command_generator.rb +1 -0
  87. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  88. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +47 -17
  89. data/gym/lib/gym/module.rb +8 -0
  90. data/gym/lib/gym/options.rb +25 -1
  91. data/gym/lib/gym/runner.rb +64 -24
  92. data/match/lib/match/change_password.rb +1 -1
  93. data/match/lib/match/encryption.rb +4 -0
  94. data/match/lib/match/encryption/openssl.rb +1 -1
  95. data/match/lib/match/generator.rb +17 -3
  96. data/match/lib/match/importer.rb +2 -2
  97. data/match/lib/match/module.rb +5 -2
  98. data/match/lib/match/nuke.rb +59 -17
  99. data/match/lib/match/options.rb +38 -15
  100. data/match/lib/match/runner.rb +24 -8
  101. data/match/lib/match/setup.rb +1 -1
  102. data/match/lib/match/spaceship_ensure.rb +19 -9
  103. data/match/lib/match/storage.rb +4 -0
  104. data/match/lib/match/storage/git_storage.rb +5 -2
  105. data/match/lib/match/storage/google_cloud_storage.rb +2 -2
  106. data/match/lib/match/storage/s3_storage.rb +162 -0
  107. data/pilot/lib/pilot/.manager.rb.swp +0 -0
  108. data/pilot/lib/pilot/build_manager.rb +55 -15
  109. data/pilot/lib/pilot/options.rb +3 -1
  110. data/scan/lib/scan/detect_values.rb +6 -1
  111. data/scan/lib/scan/manager.rb +18 -1
  112. data/scan/lib/scan/options.rb +28 -1
  113. data/scan/lib/scan/runner.rb +11 -3
  114. data/scan/lib/scan/slack_poster.rb +1 -1
  115. data/scan/lib/scan/test_command_generator.rb +9 -5
  116. data/screengrab/lib/screengrab/runner.rb +31 -18
  117. data/snapshot/lib/snapshot/fixes/simulator_shared_pasteboard.rb +16 -0
  118. data/snapshot/lib/snapshot/options.rb +12 -1
  119. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  120. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +13 -0
  121. data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
  122. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +4 -0
  123. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  124. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +5 -0
  125. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +2 -0
  126. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +6 -0
  127. data/spaceship/lib/spaceship/portal/.certificate.rb.swp +0 -0
  128. data/spaceship/lib/spaceship/portal/app.rb +11 -2
  129. data/spaceship/lib/spaceship/tunes/iap.rb +11 -11
  130. data/spaceship/lib/spaceship/tunes/iap_detail.rb +7 -3
  131. data/spaceship/lib/spaceship/tunes/iap_families.rb +12 -1
  132. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +26 -17
  133. data/spaceship/lib/spaceship/tunes/iap_status.rb +5 -1
  134. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  135. data/supply/lib/supply/client.rb +26 -0
  136. data/supply/lib/supply/uploader.rb +28 -0
  137. metadata +64 -20
@@ -37,6 +37,7 @@ module Fastlane
37
37
  Actions.sh(command)
38
38
  rescue
39
39
  handle_swiftlint_error(params[:ignore_exit_status], $?.exitstatus)
40
+ raise if params[:raise_if_swiftlint_error]
40
41
  end
41
42
  end
42
43
 
@@ -106,10 +107,22 @@ module Fastlane
106
107
  is_string: false,
107
108
  type: Boolean,
108
109
  optional: true),
110
+ FastlaneCore::ConfigItem.new(key: :raise_if_swiftlint_error,
111
+ description: "Raises an error if swiftlint fails, so you can fail CI/CD jobs if necessary \
112
+ (true/false)",
113
+ default_value: false,
114
+ is_string: false,
115
+ type: Boolean,
116
+ optional: true),
109
117
  FastlaneCore::ConfigItem.new(key: :reporter,
110
- description: 'Choose output reporter',
118
+ description: "Choose output reporter. Available: xcode, json, csv, checkstyle, junit, html, \
119
+ emoji, sonarqube, markdown, github-actions-logging",
111
120
  is_string: true,
112
- optional: true),
121
+ optional: true,
122
+ verify_block: proc do |value|
123
+ available = ['xcode', 'json', 'csv', 'checkstyle', 'junit', 'html', 'emoji', 'sonarqube', 'markdown', 'github-actions-logging']
124
+ UI.user_error!("Available values are '#{available.join("', '")}'") unless available.include?(value)
125
+ end),
113
126
  FastlaneCore::ConfigItem.new(key: :quiet,
114
127
  description: "Don't print status logs like 'Linting <file>' & 'Done linting'",
115
128
  default_value: false,
@@ -161,7 +174,9 @@ module Fastlane
161
174
  "AppDelegate.swift",
162
175
  "path/to/project/Model.swift"
163
176
  ],
177
+ raise_if_swiftlint_error: true, # Allow fastlane to raise an error if swiftlint fails
164
178
  ignore_exit_status: true # Allow fastlane to continue even if SwiftLint returns a non-zero exit status
179
+
165
180
  )'
166
181
  ]
167
182
  end
@@ -39,7 +39,7 @@ module Fastlane
39
39
  end
40
40
 
41
41
  def self.details
42
- "This action allows you to modify any `plist` file."
42
+ "This action allows you to modify any value inside any `plist` file."
43
43
  end
44
44
 
45
45
  def self.available_options
@@ -57,11 +57,46 @@ module Fastlane
57
57
  end
58
58
 
59
59
  def self.author
60
- 'rishabhtayal'
60
+ ["rishabhtayal", "matthiaszarzecki"]
61
61
  end
62
62
 
63
63
  def self.example_code
64
64
  [
65
+ 'update_plist( # Updates the CLIENT_ID and GOOGLE_APP_ID string entries in the plist-file
66
+ plist_path: "path/to/your_plist_file.plist",
67
+ block: proc do |plist|
68
+ plist[:CLIENT_ID] = "new_client_id"
69
+ plist[:GOOGLE_APP_ID] = "new_google_app_id"
70
+ end
71
+ )',
72
+ 'update_plist( # Sets a boolean entry
73
+ plist_path: "path/to/your_plist_file.plist",
74
+ block: proc do |plist|
75
+ plist[:boolean_entry] = true
76
+ end
77
+ )',
78
+ 'update_plist( # Sets a number entry
79
+ plist_path: "path/to/your_plist_file.plist",
80
+ block: proc do |plist|
81
+ plist[:number_entry] = 13
82
+ end
83
+ )',
84
+ 'update_plist( # Sets an array-entry with multiple sub-types
85
+ plist_path: "path/to/your_plist_file.plist",
86
+ block: proc do |plist|
87
+ plist[:array_entry] = ["entry_01", true, 1243]
88
+ end
89
+ )',
90
+ 'update_plist( # The block can contain logic too
91
+ plist_path: "path/to/your_plist_file.plist",
92
+ block: proc do |plist|
93
+ if options[:environment] == "production"
94
+ plist[:CLIENT_ID] = "new_client_id_production"
95
+ else
96
+ plist[:CLIENT_ID] = "new_client_id_development"
97
+ end
98
+ end
99
+ )',
65
100
  'update_plist( # Advanced processing: find URL scheme for particular key and replace value
66
101
  plist_path: "path/to/Info.plist",
67
102
  block: proc do |plist|
@@ -10,8 +10,8 @@ module Fastlane
10
10
  find_gsp_path(params)
11
11
  find_api_token(params)
12
12
 
13
- if !params[:api_token] && !params[:gsp_path]
14
- UI.user_error!('Either Fabric API key or path to Firebase Crashlytics GoogleService-Info.plist must be given.')
13
+ if !params[:app_id] && !params[:gsp_path] && !params[:api_token]
14
+ UI.user_error!('Either Firebase Crashlytics App ID, path to GoogleService-Info.plist or legacy Fabric API key must be given.')
15
15
  end
16
16
 
17
17
  dsym_paths = []
@@ -87,7 +87,9 @@ module Fastlane
87
87
  UI.message("Uploading '#{path}'...")
88
88
  command = []
89
89
  command << File.expand_path(params[:binary_path]).shellescape
90
- if params[:gsp_path]
90
+ if params[:app_id]
91
+ command << "-ai #{params[:app_id].shellescape}"
92
+ elsif params[:gsp_path]
91
93
  command << "-gsp #{params[:gsp_path].shellescape}"
92
94
  elsif params[:api_token]
93
95
  command << "-a #{params[:api_token]}"
@@ -186,6 +188,14 @@ module Fastlane
186
188
  UI.user_error!("Couldn't find file at path '#{File.expand_path(value)}'") unless File.exist?(value)
187
189
  UI.user_error!("No Path to GoogleService-Info.plist for Firebase Crashlytics given, pass using `gsp_path: 'path'`") if value.to_s.length == 0
188
190
  end),
191
+ FastlaneCore::ConfigItem.new(key: :app_id,
192
+ env_name: "CRASHLYTICS_APP_ID",
193
+ sensitive: true,
194
+ optional: true,
195
+ description: "Firebase Crashlytics APP ID",
196
+ verify_block: proc do |value|
197
+ UI.user_error!("No App ID for Firebase Crashlytics given, pass using `app_id: 'appId'`") if value.to_s.length == 0
198
+ end),
189
199
  FastlaneCore::ConfigItem.new(key: :binary_path,
190
200
  env_name: "FL_UPLOAD_SYMBOLS_TO_CRASHLYTICS_BINARY_PATH",
191
201
  description: "The path to the upload-symbols file of the Fabric app",
@@ -11,6 +11,7 @@ module Fastlane
11
11
  config.load_configuration_file("Deliverfile")
12
12
  config[:screenshots_path] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] if Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
13
13
  config[:ipa] = Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] if Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
14
+ config[:pkg] = Actions.lane_context[SharedValues::PKG_OUTPUT_PATH] if Actions.lane_context[SharedValues::PKG_OUTPUT_PATH]
14
15
 
15
16
  return config if Helper.test?
16
17
  Deliver::Runner.new(config).run
@@ -0,0 +1,78 @@
1
+ module Fastlane
2
+ module Actions
3
+ class UploadToPlayStoreInternalAppSharingAction < Action
4
+ def self.run(params)
5
+ require 'supply'
6
+
7
+ # If no APK params were provided, try to fill in the values from lane context, preferring
8
+ # the multiple APKs over the single APK if set.
9
+ if params[:apk_paths].nil? && params[:apk].nil?
10
+ all_apk_paths = Actions.lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] || []
11
+ if all_apk_paths.size > 1
12
+ params[:apk_paths] = all_apk_paths
13
+ else
14
+ params[:apk] = Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
15
+ end
16
+ end
17
+
18
+ # If no AAB param was provided, try to fill in the value from lane context.
19
+ # First GRADLE_ALL_AAB_OUTPUT_PATHS if only one
20
+ # Else from GRADLE_AAB_OUTPUT_PATH
21
+ if params[:aab].nil?
22
+ all_aab_paths = Actions.lane_context[SharedValues::GRADLE_ALL_AAB_OUTPUT_PATHS] || []
23
+ if all_aab_paths.count == 1
24
+ params[:aab] = all_aab_paths.first
25
+ else
26
+ params[:aab] = Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]
27
+ end
28
+ end
29
+
30
+ Supply.config = params # we already have the finished config
31
+
32
+ Supply::Uploader.new.perform_upload_to_internal_app_sharing
33
+ end
34
+
35
+ #####################################################
36
+ # @!group Documentation
37
+ #####################################################
38
+
39
+ def self.description
40
+ "Upload binaries to Google Play Internal App Sharing (via _supply_)"
41
+ end
42
+
43
+ def self.details
44
+ "More information: https://docs.fastlane.tools/actions/upload_to_play_store_internal_app_sharing/"
45
+ end
46
+
47
+ def self.available_options
48
+ require 'supply'
49
+ require 'supply/options'
50
+ options = Supply::Options.available_options.clone
51
+
52
+ # remove all the unnecessary (for this action) options
53
+ options_to_keep = [:package_name, :apk, :apk_paths, :aab, :aab_paths, :json_key, :json_key_data, :root_url, :timeout]
54
+ options.delete_if { |option| options_to_keep.include?(option.key) == false }
55
+ end
56
+
57
+ def self.return_value
58
+ "Returns a string containing the download URL for the uploaded APK/AAB (or array of strings if multiple were uploaded)."
59
+ end
60
+
61
+ def self.authors
62
+ ["andrewhavens"]
63
+ end
64
+
65
+ def self.is_supported?(platform)
66
+ platform == :android
67
+ end
68
+
69
+ def self.example_code
70
+ ["upload_to_play_store_internal_app_sharing"]
71
+ end
72
+
73
+ def self.category
74
+ :production
75
+ end
76
+ end
77
+ end
78
+ end
@@ -263,7 +263,7 @@ module Fastlane
263
263
  # @param branch [String] The branch to checkout in the repository
264
264
  # @param path [String] The path to the Fastfile
265
265
  # @param version [String, Array] Version requirement for repo tags
266
- def import_from_git(url: nil, branch: 'HEAD', path: 'fastlane/Fastfile', version: nil)
266
+ def import_from_git(url: nil, branch: 'HEAD', path: 'fastlane/Fastfile', version: nil, dependencies: [])
267
267
  UI.user_error!("Please pass a path to the `import_from_git` action") if url.to_s.length == 0
268
268
 
269
269
  Actions.execute_action('import_from_git') do
@@ -280,6 +280,10 @@ module Fastlane
280
280
 
281
281
  branch_option = "--branch #{branch}" if branch != 'HEAD'
282
282
 
283
+ checkout_dependencies = dependencies.map(&:shellescape).join(" ")
284
+
285
+ checkout_path = "#{path.shellescape} #{checkout_dependencies}"
286
+
283
287
  UI.message("Cloning remote git repo...")
284
288
  Helper.with_env_values('GIT_TERMINAL_PROMPT' => '0') do
285
289
  Actions.sh("git clone #{url.shellescape} #{clone_folder.shellescape} --depth 1 -n #{branch_option}")
@@ -292,7 +296,7 @@ module Fastlane
292
296
  UI.user_error!("No tag found matching #{version.inspect}") if checkout_param.nil?
293
297
  end
294
298
 
295
- Actions.sh("cd #{clone_folder.shellescape} && git checkout #{checkout_param.shellescape} #{path.shellescape}")
299
+ Actions.sh("cd #{clone_folder.shellescape} && git checkout #{checkout_param.shellescape} #{checkout_path}")
296
300
 
297
301
  # We also want to check out all the local actions of this fastlane setup
298
302
  containing = path.split(File::SEPARATOR)[0..-2]
@@ -304,7 +308,13 @@ module Fastlane
304
308
  # We don't care about a failure here, as local actions are optional
305
309
  end
306
310
 
307
- return_value = import(File.join(clone_folder, path))
311
+ return_value = nil
312
+ if dependencies.any?
313
+ return_value = [import(File.join(clone_folder, path))]
314
+ return_value += dependencies.map { |file_path| import(File.join(clone_folder, file_path)) }
315
+ else
316
+ return_value = import(File.join(clone_folder, path))
317
+ end
308
318
 
309
319
  action_completed('import_from_git', status: FastlaneCore::ActionCompletionStatus::SUCCESS)
310
320
 
@@ -24,7 +24,7 @@ module Fastlane
24
24
  adb_path = File.join(android_home, "platform-tools", "adb")
25
25
  end
26
26
 
27
- self.adb_path = adb_path
27
+ self.adb_path = File.expand_path(adb_path)
28
28
  self.adb_host = adb_host
29
29
  end
30
30
 
@@ -0,0 +1,56 @@
1
+ require 'aws-sdk'
2
+
3
+ module Fastlane
4
+ module Helper
5
+ class S3ClientHelper
6
+ attr_reader :client
7
+
8
+ def initialize(access_key: nil, secret_access_key: nil, region: nil)
9
+ creds = Aws::Credentials.new(access_key, secret_access_key)
10
+ Aws.config.update({
11
+ region: region,
12
+ credentials: creds
13
+ })
14
+
15
+ @client = Aws::S3::Client.new
16
+ end
17
+
18
+ def list_buckets
19
+ return @client.list_buckets
20
+ end
21
+
22
+ def upload_file(bucket_name, file_name, file_data, acl)
23
+ bucket = find_bucket!(bucket_name)
24
+ details = {
25
+ acl: acl,
26
+ key: file_name,
27
+ body: file_data
28
+ }
29
+ obj = bucket.put_object(details)
30
+
31
+ # When you enable versioning on a S3 bucket,
32
+ # writing to an object will create an object version
33
+ # instead of replacing the existing object.
34
+ # http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/S3/ObjectVersion.html
35
+ if obj.kind_of?(Aws::S3::ObjectVersion)
36
+ obj = obj.object
37
+ end
38
+
39
+ # Return public url
40
+ obj.public_url.to_s
41
+ end
42
+
43
+ def delete_file(bucket, file_name)
44
+ bucket = find_bucket!(bucket_name)
45
+ bucket.objects[file_name].delete
46
+ end
47
+
48
+ def find_bucket!(bucket_name)
49
+ bucket = Aws::S3::Bucket.new(bucket_name, client: @client)
50
+ raise "Bucket '#{bucket_name}' not found" unless bucket.exists?
51
+
52
+ return bucket
53
+ end
54
+ end
55
+ end
56
+ end
@@ -373,7 +373,7 @@ module Fastlane
373
373
  # (a plugin may contain any number of actions)
374
374
  version_number = Fastlane::ActionCollector.determine_version(gem_name)
375
375
  references = Fastlane.const_get(module_name).all_classes.collect do |path|
376
- next unless File.dirname(path).end_with?("/actions") # we only want to match actions
376
+ next unless File.dirname(path).include?("/actions") # we only want to match actions
377
377
 
378
378
  File.basename(path).gsub("_action", "").gsub(".rb", "").to_sym # the _action is optional
379
379
  end
@@ -157,7 +157,9 @@ CrossPlatform/ForkUsage:
157
157
  - "**/plugins/template/**/*"
158
158
  Lint/IsStringUsage:
159
159
  Include:
160
+ - cert/**/*
160
161
  - gym/**/*
162
+ - match/**/*
161
163
  - screengrab/**/*
162
164
  - supply/**/*
163
165
  Style/MethodCallWithArgsParentheses:
@@ -225,27 +225,32 @@ module Fastlane
225
225
 
226
226
  begin
227
227
  Dir.chdir(custom_dir) do # go up from the fastlane folder, to the project folder
228
- # If another action is calling this action, we shouldn't show it in the summary
228
+ # Removing step_name before its parsed into configurations
229
+ args = arguments.kind_of?(Array) && arguments.first.kind_of?(Hash) ? arguments.first : {}
230
+ step_name = args.delete(:step_name)
231
+
232
+ # arguments is an array by default, containing an hash with the actual parameters
233
+ # Since we usually just need the passed hash, we'll just use the first object if there is only one
234
+ if arguments.count == 0
235
+ configurations = ConfigurationHelper.parse(class_ref, {}) # no parameters => empty hash
236
+ elsif arguments.count == 1 && arguments.first.kind_of?(Hash)
237
+ configurations = ConfigurationHelper.parse(class_ref, arguments.first) # Correct configuration passed
238
+ elsif !class_ref.available_options
239
+ # This action does not use the new action format
240
+ # Just passing the arguments to this method
241
+ configurations = arguments
242
+ else
243
+ UI.user_error!("You have to call the integration like `#{method_sym}(key: \"value\")`. Run `fastlane action #{method_sym}` for all available keys. Please check out the current documentation on GitHub.")
244
+ end
229
245
 
246
+ # If another action is calling this action, we shouldn't show it in the summary
247
+ # A nil value for action_name will hide it from the summary
230
248
  unless from_action
231
- args = arguments.kind_of?(Array) && arguments.first.kind_of?(Hash) ? arguments.first : {}
232
- action_name = args[:step_name] || class_ref.step_text
233
- args.delete(:step_name)
249
+ action_name = step_name
250
+ action_name ||= class_ref.method(:step_text).arity == 1 ? class_ref.step_text(configurations) : class_ref.step_text
234
251
  end
235
- Actions.execute_action(action_name) do
236
- # arguments is an array by default, containing an hash with the actual parameters
237
- # Since we usually just need the passed hash, we'll just use the first object if there is only one
238
- if arguments.count == 0
239
- arguments = ConfigurationHelper.parse(class_ref, {}) # no parameters => empty hash
240
- elsif arguments.count == 1 && arguments.first.kind_of?(Hash)
241
- arguments = ConfigurationHelper.parse(class_ref, arguments.first) # Correct configuration passed
242
- elsif !class_ref.available_options
243
- # This action does not use the new action format
244
- # Just passing the arguments to this method
245
- else
246
- UI.user_error!("You have to call the integration like `#{method_sym}(key: \"value\")`. Run `fastlane action #{method_sym}` for all available keys. Please check out the current documentation on GitHub.")
247
- end
248
252
 
253
+ Actions.execute_action(action_name) do
249
254
  if Fastlane::Actions.is_deprecated?(class_ref)
250
255
  puts("==========================================".deprecated)
251
256
  puts("This action (#{method_sym}) is deprecated".deprecated)
@@ -253,7 +258,7 @@ module Fastlane
253
258
  puts("==========================================\n".deprecated)
254
259
  end
255
260
  class_ref.runner = self # needed to call another action from an action
256
- return class_ref.run(arguments)
261
+ return class_ref.run(configurations)
257
262
  end
258
263
  end
259
264
  rescue Interrupt => e
@@ -83,7 +83,7 @@ module Fastlane
83
83
 
84
84
  case command.method_name
85
85
  when "sh"
86
- error_callback = proc { |string_value| closure_argument_value = string_value }
86
+ error_callback = proc { |string_value| closure_argument_value = string_value } if parameter_map[:error_callback]
87
87
  command_param = parameter_map[:command]
88
88
  log_param = parameter_map[:log]
89
89
  action_return = Fastlane::FastFile.sh(command_param, log: log_param, error_callback: error_callback)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.138.0'.freeze
2
+ VERSION = '2.143.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -18,4 +18,4 @@ class Deliverfile: DeliverfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -57,10 +57,10 @@ protocol DeliverfileProtocol: class {
57
57
  /// Rejects the previously submitted build if it's in a state where it's possible
58
58
  var rejectIfPossible: Bool { get }
59
59
 
60
- /// Should the app be automatically released once it's approved?
60
+ /// Should the app be automatically released once it's approved? (Can not be used together with `auto_release_date`)
61
61
  var automaticRelease: Bool { get }
62
62
 
63
- /// Date in milliseconds for automatically releasing on pending approval
63
+ /// Date in milliseconds for automatically releasing on pending approval (Can not be used together with `automatic_release`)
64
64
  var autoReleaseDate: String? { get }
65
65
 
66
66
  /// Enable the phased release feature of iTC
@@ -246,4 +246,4 @@ extension DeliverfileProtocol {
246
246
 
247
247
  // Please don't remove the lines below
248
248
  // They are used to detect outdated files
249
- // FastlaneRunnerAPIVersion [0.9.18]
249
+ // FastlaneRunnerAPIVersion [0.9.19]