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 +4 -4
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +1 -1
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +1 -0
- data/fastlane/lib/fastlane/lane_manager.rb +10 -5
- data/fastlane/lib/fastlane/runner.rb +9 -0
- data/fastlane/lib/fastlane/setup/crashlytics_beta.rb +2 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +14 -1
- data/scan/lib/scan/runner.rb +16 -2
- data/scan/lib/scan/test_command_generator.rb +118 -120
- data/scan/lib/scan/test_result_parser.rb +4 -1
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +4 -3
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 329787ce0352fd64933af8c2b0f9f15554c9a90e
|
4
|
+
data.tar.gz: af4b86be47e45d429aab1ac60d66f2789693d197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
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://
|
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
|
@@ -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
|
-
|
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)
|
data/scan/lib/scan/runner.rb
CHANGED
@@ -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 =
|
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
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
17
|
-
|
18
|
-
|
15
|
+
def prefix
|
16
|
+
["set -o pipefail &&"]
|
17
|
+
end
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
55
|
-
|
68
|
+
actions
|
69
|
+
end
|
56
70
|
|
57
|
-
|
58
|
-
|
71
|
+
def suffix
|
72
|
+
suffix = []
|
73
|
+
suffix
|
74
|
+
end
|
59
75
|
|
60
|
-
|
61
|
-
|
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
|
-
|
79
|
+
if Scan.config[:output_style] == 'raw'
|
80
|
+
return pipe
|
70
81
|
end
|
71
82
|
|
72
|
-
|
73
|
-
|
74
|
-
|
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
|
-
|
78
|
-
|
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
|
-
|
114
|
-
|
115
|
-
|
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
|
-
|
99
|
+
if Scan.config[:output_style] == 'rspec'
|
100
|
+
formatter << "--test"
|
120
101
|
end
|
121
102
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
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
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
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
|
-
|
136
|
-
|
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
|
-
|
142
|
-
|
143
|
-
|
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
|
@@ -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
|
-
|
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.
|
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-
|
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
|
-
-
|
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
|
- - ">="
|