fastlane 2.201.0.rc1 → 2.201.0.rc2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0748d7414d5df9609fbffecf573937a1b74cbdebc81f9ee203e1197b58ecc5b1'
4
- data.tar.gz: 6f07f231bb899663f8d4e46561b6c2fe982aad07cc531a9796ec285b0495d8bb
3
+ metadata.gz: 41a222588b957ee2de626c4f5d4c68b06c225aa154d0a022b601c69676cde448
4
+ data.tar.gz: 50ea7458c9abe457367e1833e6f4fcafe820a52392191a0ce8e3dcf7e52cafc8
5
5
  SHA512:
6
- metadata.gz: 79d8d561694712d172f2fcb925abfab4ce52a5be9d5af2e5645dd88813e0a65581e192c4ee21b792571685293a615d839442e156322f0cea7d6ef0303487747b
7
- data.tar.gz: 8f5abd82eed5601477648a67bef8275c7ce4a48926550f409220f91fd54626ba375fef8827c5625ea6bf7d2ab833fbf8cdb49aa15ff9f02b51b93cde806cb144
6
+ metadata.gz: 0af11e8d7527c5c9fa47f76ad1ccd34b4c0a9ac4fc9ceb4aa5613f5a929761a4c4daa416717fae3e9be6c561c5ca59b58ce267ab8db4ef0722e3a1518d47ea90
7
+ data.tar.gz: 294ddfa23c72c683fa336d0437a2456d91d9bbb598a162af2f971eee012a476baca979e58e5702443c8b5f29218c50d6a25ed6f12d74a6f9bff1a417c945eceb
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.201.0.rc1'.freeze
2
+ VERSION = '2.201.0.rc2'.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 = '1.12.1'.freeze
@@ -234,7 +234,7 @@ module Gym
234
234
 
235
235
  FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
236
236
  env_names: ["GYM_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
237
- description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test')",
237
+ description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter",
238
238
  type: String,
239
239
  default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
240
240
  default_value_dynamic: true),
@@ -264,7 +264,7 @@ module Scan
264
264
 
265
265
  FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
266
266
  env_names: ["SCAN_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
267
- description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test')",
267
+ description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter",
268
268
  type: String,
269
269
  default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
270
270
  default_value_dynamic: true),
@@ -137,6 +137,36 @@ module Scan
137
137
  return retryable_tests.uniq
138
138
  end
139
139
 
140
+ def find_filename(type)
141
+ index = Scan.config[:output_types].split(',').index(type)
142
+ return nil if index.nil?
143
+ return (Scan.config[:output_files] || "").split(',')[index]
144
+ end
145
+
146
+ def output_html?
147
+ return Scan.config[:output_types].split(',').include?('html')
148
+ end
149
+
150
+ def output_junit?
151
+ return Scan.config[:output_types].split(',').include?('junit')
152
+ end
153
+
154
+ def output_json_compilation_database?
155
+ return Scan.config[:output_types].split(',').include?('json-compilation-database')
156
+ end
157
+
158
+ def output_html_filename
159
+ return find_filename('html')
160
+ end
161
+
162
+ def output_junit_filename
163
+ return find_filename('junit')
164
+ end
165
+
166
+ def output_json_compilation_database_filename
167
+ return find_filename('json-compilation-database')
168
+ end
169
+
140
170
  def trainer_test_results
141
171
  require "trainer"
142
172
 
@@ -147,17 +177,37 @@ module Scan
147
177
  }
148
178
 
149
179
  result_bundle_path = Scan.cache[:result_bundle_path]
180
+
150
181
  output_path = Scan.config[:output_directory] || Dir.mktmpdir
182
+ output_path = File.absolute_path(output_path)
151
183
 
152
184
  UI.crash!("A -resultBundlePath is needed to parse the test results. This should not have happened. Please file an issue.") unless result_bundle_path
153
185
 
154
186
  params = {
155
187
  path: result_bundle_path,
156
- output_path: output_path,
157
- silent: true,
158
- extension: "xml"
188
+ silent: true
159
189
  }
160
190
 
191
+ formatter = Scan.config[:xcodebuild_formatter].chomp
192
+
193
+ if output_html? && formatter != 'xcpretty'
194
+ UI.error("HTML output is only available with `xcodebuild_formatter: 'xcpretty'` right now...")
195
+ end
196
+
197
+ if output_json_compilation_database? && formatter != 'xcpretty'
198
+ UI.error("JSON Compilation Database output is only available with `xcodebuild_formatter: 'xcpretty'` right now...")
199
+ end
200
+
201
+ if output_junit?
202
+ if formatter == 'xcpretty'
203
+ UI.verbose("Generating junit report with xcpretty")
204
+ else
205
+ UI.verbose("Generating junit report with trainer")
206
+ params[:output_filename] = output_junit_filename || "report.junit"
207
+ params[:output_directory] = output_path
208
+ end
209
+ end
210
+
161
211
  resulting_paths = Trainer::TestParser.auto_convert(params)
162
212
  resulting_paths.each do |path, data|
163
213
  results[:number_of_tests] += data[:number_of_tests_excluding_retries]
@@ -119,7 +119,9 @@ module Scan
119
119
  formatter = Scan.config[:xcodebuild_formatter].chomp
120
120
  options = legacy_xcpretty_options
121
121
 
122
- if !options.empty?
122
+ if formatter == ''
123
+ UI.verbose("Not using an xcodebuild formatter")
124
+ elsif !options.empty?
123
125
  UI.important("Detected legacy xcpretty being used so formatting wth xcpretty")
124
126
  UI.important("Option(s) used: #{options.join(', ')}")
125
127
  pipe << pipe_xcpretty
@@ -150,7 +152,6 @@ module Scan
150
152
  options << "formatter" if Scan.config[:formatter]
151
153
  options << "xcpretty_formatter" if Scan.config[:xcpretty_formatter]
152
154
  options << "output_style" if Scan.config[:output_style]
153
- options << "output_files" if Scan.config[:output_files]
154
155
  options << "output_types" if (Scan.config[:output_types] || "").include?("json-compilation-database")
155
156
  options << "custom_report_file_name" if Scan.config[:custom_report_file_name]
156
157
 
@@ -291,7 +291,7 @@ module Snapshot
291
291
 
292
292
  FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
293
293
  env_names: ["SNAPSHOT_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
294
- description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test')",
294
+ description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter",
295
295
  type: String,
296
296
  default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
297
297
  default_value_dynamic: true),
@@ -50,29 +50,40 @@ module Trainer
50
50
 
51
51
  return_hash = {}
52
52
  files.each do |path|
53
- if config[:output_directory]
54
- FileUtils.mkdir_p(config[:output_directory])
55
- # Remove .xcresult or .plist extension
56
- if path.end_with?(".xcresult")
57
- filename = File.basename(path).gsub(".xcresult", config[:extension])
58
- else
59
- filename = File.basename(path).gsub(".plist", config[:extension])
60
- end
61
- to_path = File.join(config[:output_directory], filename)
62
- else
63
- # Remove .xcresult or .plist extension
64
- if path.end_with?(".xcresult")
65
- to_path = path.gsub(".xcresult", config[:extension])
53
+ extension = config[:extension]
54
+ output_filename = config[:output_filename]
55
+
56
+ should_write_file = !extension.nil? || !output_filename.nil?
57
+
58
+ if should_write_file
59
+ if config[:output_directory]
60
+ FileUtils.mkdir_p(config[:output_directory])
61
+ # Remove .xcresult or .plist extension
62
+ # Use custom file name ONLY if one file otherwise issues
63
+ if files.size == 1 && output_filename
64
+ filename = output_filename
65
+ elsif path.end_with?(".xcresult")
66
+ filename ||= File.basename(path).gsub(".xcresult", extension)
67
+ else
68
+ filename ||= File.basename(path).gsub(".plist", extension)
69
+ end
70
+ to_path = File.join(config[:output_directory], filename)
66
71
  else
67
- to_path = path.gsub(".plist", config[:extension])
72
+ # Remove .xcresult or .plist extension
73
+ if path.end_with?(".xcresult")
74
+ to_path = path.gsub(".xcresult", extension)
75
+ else
76
+ to_path = path.gsub(".plist", extension)
77
+ end
68
78
  end
69
79
  end
70
80
 
71
81
  tp = Trainer::TestParser.new(path, config)
72
- File.write(to_path, tp.to_junit)
73
- UI.success("Successfully generated '#{to_path}'") unless config[:silent]
82
+ File.write(to_path, tp.to_junit) if should_write_file
83
+ UI.success("Successfully generated '#{to_path}'") if should_write_file && !config[:silent]
74
84
 
75
- return_hash[to_path] = {
85
+ return_hash[path] = {
86
+ to_path: to_path,
76
87
  successful: tp.tests_successful?,
77
88
  number_of_tests: tp.number_of_tests,
78
89
  number_of_failures: tp.number_of_failures,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.201.0.rc1
4
+ version: 2.201.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Dee
@@ -32,7 +32,7 @@ authors:
32
32
  autorequire:
33
33
  bindir: bin
34
34
  cert_chain: []
35
- date: 2022-01-13 00:00:00.000000000 Z
35
+ date: 2022-01-15 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: xcodeproj