fastlane 2.36.0.beta.20170525010052 → 2.36.0.beta.20170526010038

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 081c66bd3dfba98434c2ddf9c795766f8f639df2
4
- data.tar.gz: 0392045cfe30e5e03da8173b5f8876eb39d91b1b
3
+ metadata.gz: 329787ce0352fd64933af8c2b0f9f15554c9a90e
4
+ data.tar.gz: af4b86be47e45d429aab1ac60d66f2789693d197
5
5
  SHA512:
6
- metadata.gz: c158081ba4cfd9237606bd89ed40d4c3747c690e95c9de03569ded3fda250760a6f70f81112267f3d8e50c0fa8eb85ee8ebdaa8411865cfc8a5764f393fdbd59
7
- data.tar.gz: c282fbbfd0cdd4c636ddbcb9758eec8d0ba1c1f1f56267eddcd45dd22e46953a36d9721f4dbb0ace67d5862a56778c25bc640147d3785336cd9765b2e2b52376
6
+ metadata.gz: 23cc555705f3a818ce241f2da2e4475713b7426877f1fb56b2ee1c37576f072cbbf4ab114a0434d676a90c53c04d2486caa36ab59251f32b975a72cce173f4e7
7
+ data.tar.gz: ed709bd47ea5218ac86ee747cb456514ca34949aafe5a9ff9423998d9b46ec73579b1f546ba3e44128938b2dfb91a7a9ce3670d78457e9e0e34469ccb14d8a27
@@ -112,7 +112,7 @@ module Fastlane
112
112
  short_option: "-a",
113
113
  env_name: "DOWNLOAD_DSYMS_APP_IDENTIFIER",
114
114
  description: "The bundle identifier of your app",
115
- optional: true,
115
+ optional: false,
116
116
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
117
117
  FastlaneCore::ConfigItem.new(key: :team_id,
118
118
  short_option: "-k",
@@ -92,6 +92,7 @@ module Fastlane
92
92
  UI.important "to launch fastlane faster, please use"
93
93
  UI.message ""
94
94
  UI.command "bundle exec fastlane #{ARGV.join(' ')}"
95
+ UI.message ""
95
96
  else
96
97
  # fastlane is slow and there is no Gemfile
97
98
  # Let's tell the user how to use `gem cleanup` and how to
@@ -233,11 +233,16 @@ module Fastlane
233
233
  [key, content.to_s]
234
234
  end
235
235
 
236
- require 'terminal-table'
237
- puts Terminal::Table.new({
238
- title: "Lane Context".yellow,
239
- rows: FastlaneCore::PrintTable.transform_output(rows)
240
- })
236
+ begin
237
+ require 'terminal-table'
238
+ puts Terminal::Table.new({
239
+ title: "Lane Context".yellow,
240
+ rows: FastlaneCore::PrintTable.transform_output(rows)
241
+ })
242
+ rescue
243
+ os = Helper.linux? ? 'linux' : 'mac'
244
+ UI.crash!("Something went wrong trying to print the lane context on #{os}")
245
+ end
241
246
  end
242
247
  end
243
248
  end
@@ -319,14 +319,23 @@ module Fastlane
319
319
  end
320
320
 
321
321
  def set_before_all(platform, block)
322
+ unless before_all_blocks[platform].nil?
323
+ UI.error("You defined multiple `before_all` blocks in your `Fastfile`. The last one being set will be used.")
324
+ end
322
325
  before_all_blocks[platform] = block
323
326
  end
324
327
 
325
328
  def set_after_all(platform, block)
329
+ unless after_all_blocks[platform].nil?
330
+ UI.error("You defined multiple `after_all` blocks in your `Fastfile`. The last one being set will be used.")
331
+ end
326
332
  after_all_blocks[platform] = block
327
333
  end
328
334
 
329
335
  def set_error(platform, block)
336
+ unless error_blocks[platform].nil?
337
+ UI.error("You defined multiple `error` blocks in your `Fastfile`. The last one being set will be used.")
338
+ end
330
339
  error_blocks[platform] = block
331
340
  end
332
341
 
@@ -55,7 +55,8 @@ module Fastlane
55
55
 
56
56
  # rubocop:disable Style/IndentationConsistency
57
57
  %{ #
58
- # Learn more here: https://github.com/fastlane/setups/blob/master/samples-ios/distribute-beta-build.md 🚀
58
+ # Learn more here: https://docs.fastlane.tools/getting-started/ios/beta-deployment/
59
+ # and: https://docs.fastlane.tools/getting-started/android/beta-deployment/
59
60
  #
60
61
  lane :beta do |values|
61
62
  # Fabric generated this lane for deployment to Crashlytics Beta
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.36.0.beta.20170525010052'.freeze
2
+ VERSION = '2.36.0.beta.20170526010038'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -62,7 +62,20 @@ module Commander
62
62
  raise e
63
63
  else
64
64
  FastlaneCore::CrashReporter.report_crash(exception: e, action: @program[:name])
65
- abort e.to_s
65
+ if self.active_command.name == "help" && @default_command == :help # need to access directly via @
66
+ # This is a special case, for example for pilot
67
+ # when the user runs `fastlane pilot -u user@google.com`
68
+ # This would be confusing, as the user probably wanted to use `pilot list`
69
+ # or some other command. Because `-u` isn't available for the `pilot --help`
70
+ # command it would show this very confusing error message otherwise
71
+ abort "Please ensure to use one of the available commands (#{self.commands.keys.join(', ')})".red
72
+ else
73
+ # This would print something like
74
+ #
75
+ # invalid option: -u
76
+ #
77
+ abort e.to_s
78
+ end
66
79
  end
67
80
  rescue FastlaneCore::Interface::FastlaneCommonException => e # these are exceptions that we dont count as crashes
68
81
  display_user_error!(e, e.to_s)
@@ -5,6 +5,10 @@ require 'terminal-table'
5
5
 
6
6
  module Scan
7
7
  class Runner
8
+ def initialize
9
+ @test_command_generator = TestCommandGenerator.new
10
+ end
11
+
8
12
  def run
9
13
  handle_results(test_app)
10
14
  end
@@ -16,7 +20,7 @@ module Scan
16
20
  # This way it's okay to just call it for the first simulator we're using for
17
21
  # the first test run
18
22
  open_simulator_for_device(Scan.devices.first) if Scan.devices
19
- command = TestCommandGenerator.generate
23
+ command = @test_command_generator.generate
20
24
  prefix_hash = [
21
25
  {
22
26
  prefix: "Running Tests: ",
@@ -80,7 +84,17 @@ module Scan
80
84
  end
81
85
 
82
86
  def test_results
83
- return "" unless Scan.cache[:temp_junit_report]
87
+ temp_junit_report = Scan.cache[:temp_junit_report]
88
+ return File.read(temp_junit_report) if temp_junit_report && File.file?(temp_junit_report)
89
+
90
+ # Something went wrong with the temp junit report for the test success/failures count.
91
+ # We'll have to regenerate from the xcodebuild log, like we did before version 2.34.0.
92
+ UI.message("Generating test results. This may take a while for large projects.")
93
+
94
+ reporter_options_generator = XCPrettyReporterOptionsGenerator.new(false, [], [], "", false)
95
+ reporter_options = reporter_options_generator.generate_reporter_options
96
+ cmd = "cat #{@test_command_generator.xcodebuild_log_path} | xcpretty #{reporter_options.join(' ')} &> /dev/null"
97
+ system(cmd)
84
98
  File.read(Scan.cache[:temp_junit_report])
85
99
  end
86
100
 
@@ -1,149 +1,147 @@
1
1
  module Scan
2
2
  # Responsible for building the fully working xcodebuild command
3
3
  class TestCommandGenerator
4
- class << self
5
- def generate
6
- parts = prefix
7
- parts << "env NSUnbufferedIO=YES xcodebuild"
8
- parts += options
9
- parts += actions
10
- parts += suffix
11
- parts += pipe
12
-
13
- parts
14
- end
4
+ def generate
5
+ parts = prefix
6
+ parts << "env NSUnbufferedIO=YES xcodebuild"
7
+ parts += options
8
+ parts += actions
9
+ parts += suffix
10
+ parts += pipe
11
+
12
+ parts
13
+ end
15
14
 
16
- def prefix
17
- ["set -o pipefail &&"]
18
- end
15
+ def prefix
16
+ ["set -o pipefail &&"]
17
+ end
19
18
 
20
- # Path to the project or workspace as parameter
21
- # This will also include the scheme (if given)
22
- # @return [Array] The array with all the components to join
23
- def project_path_array
24
- proj = Scan.project.xcodebuild_parameters
25
- return proj if proj.count > 0
26
- UI.user_error!("No project/workspace found")
27
- end
19
+ # Path to the project or workspace as parameter
20
+ # This will also include the scheme (if given)
21
+ # @return [Array] The array with all the components to join
22
+ def project_path_array
23
+ proj = Scan.project.xcodebuild_parameters
24
+ return proj if proj.count > 0
25
+ UI.user_error!("No project/workspace found")
26
+ end
27
+
28
+ def options
29
+ config = Scan.config
30
+
31
+ options = []
32
+ options += project_path_array unless config[:xctestrun]
33
+ options << "-sdk '#{config[:sdk]}'" if config[:sdk]
34
+ options << destination # generated in `detect_values`
35
+ options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
36
+ options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path]
37
+ options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
38
+ options << "-enableCodeCoverage #{config[:code_coverage] ? 'YES' : 'NO'}" unless config[:code_coverage].nil?
39
+ options << "-enableAddressSanitizer #{config[:address_sanitizer] ? 'YES' : 'NO'}" unless config[:address_sanitizer].nil?
40
+ options << "-enableThreadSanitizer #{config[:thread_sanitizer] ? 'YES' : 'NO'}" unless config[:thread_sanitizer].nil?
41
+ options << "-xcconfig '#{config[:xcconfig]}'" if config[:xcconfig]
42
+ options << "-xctestrun '#{config[:xctestrun]}'" if config[:xctestrun]
43
+ options << config[:xcargs] if config[:xcargs]
44
+
45
+ # detect_values will ensure that these values are present as Arrays if
46
+ # they are present at all
47
+ options += config[:only_testing].map { |test_id| "-only-testing:#{test_id}" } if config[:only_testing]
48
+ options += config[:skip_testing].map { |test_id| "-skip-testing:#{test_id}" } if config[:skip_testing]
49
+
50
+ options
51
+ end
52
+
53
+ def actions
54
+ config = Scan.config
55
+
56
+ actions = []
57
+ actions << :clean if config[:clean]
28
58
 
29
- def options
30
- config = Scan.config
31
-
32
- options = []
33
- options += project_path_array unless config[:xctestrun]
34
- options << "-sdk '#{config[:sdk]}'" if config[:sdk]
35
- options << destination # generated in `detect_values`
36
- options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
37
- options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path]
38
- options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
39
- options << "-enableCodeCoverage #{config[:code_coverage] ? 'YES' : 'NO'}" unless config[:code_coverage].nil?
40
- options << "-enableAddressSanitizer #{config[:address_sanitizer] ? 'YES' : 'NO'}" unless config[:address_sanitizer].nil?
41
- options << "-enableThreadSanitizer #{config[:thread_sanitizer] ? 'YES' : 'NO'}" unless config[:thread_sanitizer].nil?
42
- options << "-xcconfig '#{config[:xcconfig]}'" if config[:xcconfig]
43
- options << "-xctestrun '#{config[:xctestrun]}'" if config[:xctestrun]
44
- options << config[:xcargs] if config[:xcargs]
45
-
46
- # detect_values will ensure that these values are present as Arrays if
47
- # they are present at all
48
- options += config[:only_testing].map { |test_id| "-only-testing:#{test_id}" } if config[:only_testing]
49
- options += config[:skip_testing].map { |test_id| "-skip-testing:#{test_id}" } if config[:skip_testing]
50
-
51
- options
59
+ if config[:build_for_testing]
60
+ actions << "build-for-testing"
61
+ elsif config[:test_without_building] || config[:xctestrun]
62
+ actions << "test-without-building"
63
+ else
64
+ actions << :build unless config[:skip_build]
65
+ actions << :test
52
66
  end
53
67
 
54
- def actions
55
- config = Scan.config
68
+ actions
69
+ end
56
70
 
57
- actions = []
58
- actions << :clean if config[:clean]
71
+ def suffix
72
+ suffix = []
73
+ suffix
74
+ end
59
75
 
60
- if config[:build_for_testing]
61
- actions << "build-for-testing"
62
- elsif config[:test_without_building] || config[:xctestrun]
63
- actions << "test-without-building"
64
- else
65
- actions << :build unless config[:skip_build]
66
- actions << :test
67
- end
76
+ def pipe
77
+ pipe = ["| tee '#{xcodebuild_log_path}'"]
68
78
 
69
- actions
79
+ if Scan.config[:output_style] == 'raw'
80
+ return pipe
70
81
  end
71
82
 
72
- def suffix
73
- suffix = []
74
- suffix
83
+ formatter = []
84
+ if Scan.config[:formatter]
85
+ formatter << "-f `#{Scan.config[:formatter]}`"
86
+ elsif FastlaneCore::Env.truthy?("TRAVIS")
87
+ formatter << "-f `xcpretty-travis-formatter`"
88
+ UI.success("Automatically switched to Travis formatter")
75
89
  end
76
90
 
77
- def pipe
78
- pipe = ["| tee '#{xcodebuild_log_path}'"]
79
-
80
- if Scan.config[:output_style] == 'raw'
81
- return pipe
82
- end
83
-
84
- formatter = []
85
- if Scan.config[:formatter]
86
- formatter << "-f `#{Scan.config[:formatter]}`"
87
- elsif FastlaneCore::Env.truthy?("TRAVIS")
88
- formatter << "-f `xcpretty-travis-formatter`"
89
- UI.success("Automatically switched to Travis formatter")
90
- end
91
-
92
- if Helper.colors_disabled?
93
- formatter << "--no-color"
94
- end
95
-
96
- if Scan.config[:output_style] == 'basic'
97
- formatter << "--no-utf"
98
- end
99
-
100
- if Scan.config[:output_style] == 'rspec'
101
- formatter << "--test"
102
- end
103
-
104
- reporter_options_generator = XCPrettyReporterOptionsGenerator.new(Scan.config[:open_report],
105
- Scan.config[:output_types],
106
- Scan.config[:output_files] || Scan.config[:custom_report_file_name],
107
- Scan.config[:output_directory],
108
- Scan.config[:use_clang_report_name])
109
- reporter_options = reporter_options_generator.generate_reporter_options
110
- return pipe << "| xcpretty #{formatter.join(' ')} #{reporter_options.join(' ')}"
91
+ if Helper.colors_disabled?
92
+ formatter << "--no-color"
111
93
  end
112
94
 
113
- # Store the raw file
114
- def xcodebuild_log_path
115
- file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"
116
- containing = File.expand_path(Scan.config[:buildlog_path])
117
- FileUtils.mkdir_p(containing)
95
+ if Scan.config[:output_style] == 'basic'
96
+ formatter << "--no-utf"
97
+ end
118
98
 
119
- return File.join(containing, file_name)
99
+ if Scan.config[:output_style] == 'rspec'
100
+ formatter << "--test"
120
101
  end
121
102
 
122
- # Generate destination parameters
123
- def destination
124
- unless Scan.cache[:destination]
125
- Scan.cache[:destination] = [*Scan.config[:destination]].map { |dst| "-destination '#{dst}'" }.join(' ')
126
- end
127
- Scan.cache[:destination]
103
+ @reporter_options_generator = XCPrettyReporterOptionsGenerator.new(Scan.config[:open_report],
104
+ Scan.config[:output_types],
105
+ Scan.config[:output_files] || Scan.config[:custom_report_file_name],
106
+ Scan.config[:output_directory],
107
+ Scan.config[:use_clang_report_name])
108
+ reporter_options = @reporter_options_generator.generate_reporter_options
109
+ return pipe << "| xcpretty #{formatter.join(' ')} #{reporter_options.join(' ')}"
110
+ end
111
+
112
+ # Store the raw file
113
+ def xcodebuild_log_path
114
+ file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"
115
+ containing = File.expand_path(Scan.config[:buildlog_path])
116
+ FileUtils.mkdir_p(containing)
117
+
118
+ return File.join(containing, file_name)
119
+ end
120
+
121
+ # Generate destination parameters
122
+ def destination
123
+ unless Scan.cache[:destination]
124
+ Scan.cache[:destination] = [*Scan.config[:destination]].map { |dst| "-destination '#{dst}'" }.join(' ')
128
125
  end
126
+ Scan.cache[:destination]
127
+ end
129
128
 
130
- # The path to set the Derived Data to
131
- def build_path
132
- unless Scan.cache[:build_path]
133
- day = Time.now.strftime("%F") # e.g. 2015-08-07
129
+ # The path to set the Derived Data to
130
+ def build_path
131
+ unless Scan.cache[:build_path]
132
+ day = Time.now.strftime("%F") # e.g. 2015-08-07
134
133
 
135
- Scan.cache[:build_path] = File.expand_path("~/Library/Developer/Xcode/Archives/#{day}/")
136
- FileUtils.mkdir_p Scan.cache[:build_path]
137
- end
138
- Scan.cache[:build_path]
134
+ Scan.cache[:build_path] = File.expand_path("~/Library/Developer/Xcode/Archives/#{day}/")
135
+ FileUtils.mkdir_p Scan.cache[:build_path]
139
136
  end
137
+ Scan.cache[:build_path]
138
+ end
140
139
 
141
- def result_bundle_path
142
- unless Scan.cache[:result_bundle_path]
143
- Scan.cache[:result_bundle_path] = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ".test_result"
144
- end
145
- return Scan.cache[:result_bundle_path]
140
+ def result_bundle_path
141
+ unless Scan.cache[:result_bundle_path]
142
+ Scan.cache[:result_bundle_path] = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ".test_result"
146
143
  end
144
+ return Scan.cache[:result_bundle_path]
147
145
  end
148
146
  end
149
147
  end
@@ -14,7 +14,10 @@ module Scan
14
14
  }
15
15
  else
16
16
  UI.error("Couldn't parse the number of tests from the output")
17
- return {}
17
+ return {
18
+ tests: 0,
19
+ failures: 0
20
+ }
18
21
  end
19
22
  end
20
23
  end
@@ -45,7 +45,7 @@ module Scan
45
45
  type = raw_type.strip
46
46
  output_path = File.join(File.expand_path(@output_directory), determine_output_file_name(type))
47
47
  reporter << "--report #{type}"
48
- reporter << "--output #{output_path}"
48
+ reporter << "--output '#{output_path}'"
49
49
 
50
50
  if type == "html" && @open_report
51
51
  Scan.cache[:open_html_report_path] = output_path
@@ -55,9 +55,10 @@ module Scan
55
55
  # adds another junit reporter in case the user does not specify one
56
56
  # this will be used to generate a results table and then discarded
57
57
  require 'tempfile'
58
- Scan.cache[:temp_junit_report] = Tempfile.new("junit_report").path
58
+ @temp_junit_report = Tempfile.new("junit_report")
59
+ Scan.cache[:temp_junit_report] = @temp_junit_report.path
59
60
  reporter << "--report junit"
60
- reporter << "--output #{Scan.cache[:temp_junit_report]}"
61
+ reporter << "--output '#{Scan.cache[:temp_junit_report]}'"
61
62
  return reporter
62
63
  end
63
64
 
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.36.0.beta.20170525010052
4
+ version: 2.36.0.beta.20170526010038
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-05-25 00:00:00.000000000 Z
18
+ date: 2017-05-26 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1368,23 +1368,23 @@ metadata:
1368
1368
  post_install_message:
1369
1369
  rdoc_options: []
1370
1370
  require_paths:
1371
+ - deliver/lib
1372
+ - sigh/lib
1373
+ - match/lib
1371
1374
  - scan/lib
1375
+ - cert/lib
1372
1376
  - credentials_manager/lib
1373
- - pilot/lib
1374
- - fastlane_core/lib
1375
1377
  - fastlane/lib
1376
- - match/lib
1377
- - cert/lib
1378
- - sigh/lib
1379
1378
  - spaceship/lib
1380
- - pem/lib
1381
- - screengrab/lib
1382
- - gym/lib
1383
- - deliver/lib
1379
+ - fastlane_core/lib
1384
1380
  - snapshot/lib
1381
+ - pilot/lib
1385
1382
  - frameit/lib
1386
1383
  - produce/lib
1387
1384
  - supply/lib
1385
+ - pem/lib
1386
+ - screengrab/lib
1387
+ - gym/lib
1388
1388
  required_ruby_version: !ruby/object:Gem::Requirement
1389
1389
  requirements:
1390
1390
  - - ">="