fastlane_core 0.43.5 → 0.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane_core.rb +0 -1
- data/lib/fastlane_core/cert_checker.rb +2 -2
- data/lib/fastlane_core/configuration/configuration_file.rb +4 -4
- data/lib/fastlane_core/device_manager.rb +4 -4
- data/lib/fastlane_core/helper.rb +0 -42
- data/lib/fastlane_core/tool_collector.rb +27 -19
- data/lib/fastlane_core/ui/fastlane_runner.rb +0 -1
- data/lib/fastlane_core/version.rb +1 -1
- metadata +3 -19
- data/lib/fastlane_core/crash_reporting/clean_stack_trace.rb +0 -18
- data/lib/fastlane_core/crash_reporting/crash_reporting.rb +0 -85
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b3c9145a7514244cbfa62bb7e5bd0e847cad507
|
4
|
+
data.tar.gz: e3ae44d5d71b41e1b5a22fbaf7c89314e3b96e8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f504183fcc913e355b1677b5c62503d4418a92ccf5d763e9abee082f491cd4c9ac8acd56447f8b6c49d5b9e99b1c18ef5d7dc897915a87bd586c7d7964876cde
|
7
|
+
data.tar.gz: 2c13bc156f3872ae92ed8c998009f09cd7fc437e2d93654ceb260b487435d56711fcd60928ccae3fc243dc0fbebd5a7d1a784c0ad0567f9c9e85de49fd3680b4
|
data/lib/fastlane_core.rb
CHANGED
@@ -21,7 +21,6 @@ require 'fastlane_core/ipa_upload_package_builder'
|
|
21
21
|
require 'fastlane_core/print_table'
|
22
22
|
require 'fastlane_core/project'
|
23
23
|
require 'fastlane_core/device_manager'
|
24
|
-
require 'fastlane_core/crash_reporting/crash_reporting'
|
25
24
|
require 'fastlane_core/ui/ui'
|
26
25
|
require 'fastlane_core/tool_collector'
|
27
26
|
|
@@ -49,7 +49,7 @@ module FastlaneCore
|
|
49
49
|
def self.wwdr_certificate_installed?
|
50
50
|
certificate_name = "Apple Worldwide Developer Relations Certification Authority"
|
51
51
|
keychain = wwdr_keychain
|
52
|
-
response = Helper.backticks("security find-certificate -c '#{certificate_name}' #{keychain}", print: $verbose)
|
52
|
+
response = Helper.backticks("security find-certificate -c '#{certificate_name}' #{keychain.shellescape}", print: $verbose)
|
53
53
|
return response.include?("attributes:")
|
54
54
|
end
|
55
55
|
|
@@ -59,7 +59,7 @@ module FastlaneCore
|
|
59
59
|
filename = File.basename(url)
|
60
60
|
keychain = wwdr_keychain
|
61
61
|
keychain.prepend("-k ") unless keychain.empty?
|
62
|
-
|
62
|
+
Helper.backticks("curl -O #{url} && security import #{filename} #{keychain.shellescape}", print: $verbose)
|
63
63
|
UI.user_error!("Could not install WWDR certificate") unless $?.success?
|
64
64
|
end
|
65
65
|
end
|
@@ -13,10 +13,10 @@ module FastlaneCore
|
|
13
13
|
|
14
14
|
# From https://github.com/orta/danger/blob/master/lib/danger/Dangerfile.rb
|
15
15
|
if content.tr!('“”‘’‛', %(""'''))
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
UI.error("Your #{File.basename(path)} has had smart quotes sanitised. " \
|
17
|
+
'To avoid issues in the future, you should not use ' \
|
18
|
+
'TextEdit for editing it. If you are not using TextEdit, ' \
|
19
|
+
'you should turn off smart quotes in your editor of choice.')
|
20
20
|
end
|
21
21
|
|
22
22
|
begin
|
@@ -9,7 +9,7 @@ module FastlaneCore
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def simulators(requested_os_type = "")
|
12
|
-
UI.
|
12
|
+
UI.verbose("Fetching available simulator devices")
|
13
13
|
|
14
14
|
@devices = []
|
15
15
|
os_type = 'unknown'
|
@@ -42,7 +42,7 @@ module FastlaneCore
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def connected_devices(requested_os_type)
|
45
|
-
|
45
|
+
UI.verbose("Fetching available connected devices")
|
46
46
|
|
47
47
|
device_types = if requested_os_type == "tvOS"
|
48
48
|
["AppleTV"]
|
@@ -84,7 +84,7 @@ module FastlaneCore
|
|
84
84
|
match = instruments_device.match(/(.+) \(([0-9.]+)\) \[([0-9a-f]+)\]?/)
|
85
85
|
if match && match[3] == device_uuid
|
86
86
|
devices << Device.new(name: match[1], udid: match[3], os_version: match[2], state: "Booted", is_simulator: false)
|
87
|
-
|
87
|
+
UI.verbose("USB Device Found - \"" + match[1] + "\" (" + match[2] + ") UUID:" + match[3])
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -95,7 +95,7 @@ module FastlaneCore
|
|
95
95
|
|
96
96
|
# The code below works from Xcode 7 on
|
97
97
|
# def all
|
98
|
-
# UI.
|
98
|
+
# UI.verbose("Fetching available devices")
|
99
99
|
|
100
100
|
# @devices = []
|
101
101
|
# output = ''
|
data/lib/fastlane_core/helper.rb
CHANGED
@@ -2,48 +2,7 @@ require 'logger'
|
|
2
2
|
require 'colored'
|
3
3
|
|
4
4
|
module FastlaneCore
|
5
|
-
# rubocop:disable Metrics/ModuleLength
|
6
5
|
module Helper
|
7
|
-
# Logging happens using this method
|
8
|
-
def self.log
|
9
|
-
$stdout.sync = true
|
10
|
-
|
11
|
-
if is_test?
|
12
|
-
@log ||= Logger.new(nil) # don't show any logs when running tests
|
13
|
-
else
|
14
|
-
@log ||= Logger.new($stdout)
|
15
|
-
end
|
16
|
-
|
17
|
-
@log.formatter = proc do |severity, datetime, progname, msg|
|
18
|
-
string = "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: " if $verbose
|
19
|
-
string = "[#{datetime.strftime('%H:%M:%S')}]: " unless $verbose
|
20
|
-
second = "#{msg}\n"
|
21
|
-
|
22
|
-
if severity == "DEBUG"
|
23
|
-
string = string.magenta
|
24
|
-
elsif severity == "INFO"
|
25
|
-
string = string.white
|
26
|
-
elsif severity == "WARN"
|
27
|
-
string = string.yellow
|
28
|
-
elsif severity == "ERROR"
|
29
|
-
string = string.red
|
30
|
-
elsif severity == "FATAL"
|
31
|
-
string = string.red.bold
|
32
|
-
end
|
33
|
-
|
34
|
-
[string, second].join("")
|
35
|
-
end
|
36
|
-
|
37
|
-
@log
|
38
|
-
end
|
39
|
-
|
40
|
-
# This method can be used to add nice lines around the actual log
|
41
|
-
# Use this to log more important things
|
42
|
-
# The logs will be green automatically
|
43
|
-
def self.log_alert(text)
|
44
|
-
UI.header(text)
|
45
|
-
end
|
46
|
-
|
47
6
|
# Runs a given command using backticks (`)
|
48
7
|
# and prints them out using the UI.command method
|
49
8
|
def self.backticks(command, print: true)
|
@@ -178,5 +137,4 @@ module FastlaneCore
|
|
178
137
|
end
|
179
138
|
end
|
180
139
|
end
|
181
|
-
# rubocop:enable Metrics/ModuleLength
|
182
140
|
end
|
@@ -25,34 +25,33 @@ module FastlaneCore
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def did_launch_action(name)
|
28
|
-
name = name.to_sym
|
28
|
+
name = name_to_track(name.to_sym)
|
29
|
+
return unless name
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
versions[name] ||= determine_version(name)
|
33
|
-
end
|
31
|
+
launches[name] += 1
|
32
|
+
versions[name] ||= determine_version(name)
|
34
33
|
end
|
35
34
|
|
36
35
|
# Call when the problem is a caught/controlled exception (e.g. via UI.user_error!)
|
37
36
|
def did_raise_error(name)
|
38
|
-
name = name.to_sym
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
name = name_to_track(name.to_sym)
|
38
|
+
return unless name
|
39
|
+
|
40
|
+
@error = name
|
41
|
+
# Don't write to the @crash field so that we can distinguish this exception later
|
42
|
+
# as being controlled
|
44
43
|
end
|
45
44
|
|
46
45
|
# Call when the problem is an uncaught/uncontrolled exception (e.g. via UI.crash!)
|
47
46
|
def did_crash(name)
|
48
|
-
name = name.to_sym
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
47
|
+
name = name_to_track(name.to_sym)
|
48
|
+
return unless name
|
49
|
+
|
50
|
+
# Write to the @error field to maintain the historical behavior of the field, so
|
51
|
+
# that the server gets the same data in that field from old and new clients
|
52
|
+
@error = name
|
53
|
+
# Also specifically note that this exception was uncontrolled in the @crash field
|
54
|
+
@crash = true
|
56
55
|
end
|
57
56
|
|
58
57
|
def did_finish
|
@@ -113,10 +112,19 @@ module FastlaneCore
|
|
113
112
|
@versions ||= {}
|
114
113
|
end
|
115
114
|
|
115
|
+
# Override this in subclasses
|
116
116
|
def is_official?(name)
|
117
117
|
return true
|
118
118
|
end
|
119
119
|
|
120
|
+
# Returns nil if we shouldn't track this action
|
121
|
+
# Returns a (maybe modified) name that should be sent to the enhancer web service
|
122
|
+
# Modificiation is used to prefix the action name with the name of the plugin
|
123
|
+
def name_to_track(name)
|
124
|
+
return nil unless is_official?(name)
|
125
|
+
name
|
126
|
+
end
|
127
|
+
|
120
128
|
def did_show_message?
|
121
129
|
path = File.join(File.expand_path('~'), '.did_show_opt_info')
|
122
130
|
did_show = File.exist?(path)
|
@@ -61,7 +61,6 @@ module Commander
|
|
61
61
|
error_info = error_info.join("\n\t") if error_info.kind_of?(Array)
|
62
62
|
display_user_error!(e, error_info)
|
63
63
|
else
|
64
|
-
FastlaneCore::CrashReporting.handle_crash(e)
|
65
64
|
# From https://stackoverflow.com/a/4789702/445598
|
66
65
|
# We do this to make the actual error message red and therefore more visible
|
67
66
|
reraise_formatted!(e, e.message)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.44.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -150,20 +150,6 @@ dependencies:
|
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 1.4.5
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: sentry-raven
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0.15'
|
160
|
-
type: :runtime
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0.15'
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
154
|
name: credentials_manager
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -356,8 +342,6 @@ files:
|
|
356
342
|
- lib/fastlane_core/configuration/configuration.rb
|
357
343
|
- lib/fastlane_core/configuration/configuration_file.rb
|
358
344
|
- lib/fastlane_core/core_ext/string.rb
|
359
|
-
- lib/fastlane_core/crash_reporting/clean_stack_trace.rb
|
360
|
-
- lib/fastlane_core/crash_reporting/crash_reporting.rb
|
361
345
|
- lib/fastlane_core/device_manager.rb
|
362
346
|
- lib/fastlane_core/helper.rb
|
363
347
|
- lib/fastlane_core/ipa_file_analyser.rb
|
@@ -401,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
401
385
|
version: '0'
|
402
386
|
requirements: []
|
403
387
|
rubyforge_project:
|
404
|
-
rubygems_version: 2.
|
388
|
+
rubygems_version: 2.4.0
|
405
389
|
signing_key:
|
406
390
|
specification_version: 4
|
407
391
|
summary: Contains all shared code/dependencies of the fastlane.tools
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Raven
|
2
|
-
# This class gets rid of the user folder, as we don't want to share the username
|
3
|
-
class Processor
|
4
|
-
class CleanStackTrace < Processor
|
5
|
-
def process(value)
|
6
|
-
if value[:exception]
|
7
|
-
value[:exception][:values].each do |single_exception|
|
8
|
-
single_exception[:stacktrace][:frames].each do |current|
|
9
|
-
current[:abs_path].gsub!(Dir.home, "~")
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
return value
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
module FastlaneCore
|
2
|
-
class CrashReporting
|
3
|
-
URL = 'https://02c6a8be5bd4425389706655f3657f5c:de62aa2bffe643948ea6f81354adb8d6@app.getsentry.com/55281'
|
4
|
-
class << self
|
5
|
-
def file_path
|
6
|
-
File.expand_path(File.join('~/.fastlane_crash_reporting'))
|
7
|
-
end
|
8
|
-
|
9
|
-
def enable
|
10
|
-
File.write(file_path, "1")
|
11
|
-
puts "Successfully enabled crash reporting.".green
|
12
|
-
puts "This will only send a stack trace for installed gems to Sentry.".green
|
13
|
-
puts "Thanks for improving fastlane!".green
|
14
|
-
end
|
15
|
-
|
16
|
-
def disable
|
17
|
-
File.delete(file_path) if File.exist?(file_path)
|
18
|
-
puts "Disabled crash reporting :("
|
19
|
-
end
|
20
|
-
|
21
|
-
def enabled?
|
22
|
-
File.exist?(file_path)
|
23
|
-
end
|
24
|
-
|
25
|
-
def show_message
|
26
|
-
puts "-------------------------------------------------------------------------------------------".yellow
|
27
|
-
puts "😨 An error occured. Please enable crash reports using `fastlane enable_crash_reporting`.".yellow
|
28
|
-
puts "👍 This makes resolving issues much easier and helps improve fastlane.".yellow
|
29
|
-
puts "🔒 The reports will be stored securely on getsentry.com.".yellow
|
30
|
-
puts "🙊 More information about privacy: https://github.com/fastlane/fastlane/releases/tag/1.33.3".yellow
|
31
|
-
puts "-------------------------------------------------------------------------------------------".yellow
|
32
|
-
end
|
33
|
-
|
34
|
-
# Ask the user politely if they want to send crash reports
|
35
|
-
def ask_during_setup
|
36
|
-
return if enabled?
|
37
|
-
|
38
|
-
puts "-------------------------------------------------------------------------------------------".yellow
|
39
|
-
puts "😃 Enable crash reporting when fastlane experiences a problem?".yellow
|
40
|
-
puts "👍 This makes resolving issues much easier and helps improve fastlane.".yellow
|
41
|
-
puts "🔒 The reports will be stored securely on getsentry.com".yellow
|
42
|
-
puts "🙊 More information about privacy: https://github.com/fastlane/fastlane/releases/tag/1.33.3".yellow
|
43
|
-
puts "🌴 You can always disable crash reports at anytime `fastlane disable_crash_reporting`".yellow
|
44
|
-
puts "-------------------------------------------------------------------------------------------".yellow
|
45
|
-
if agree("Do you want to enable crash reporting? (y/n) ", true)
|
46
|
-
enable
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def handle_crash(ex)
|
51
|
-
unless enabled?
|
52
|
-
show_message
|
53
|
-
return
|
54
|
-
end
|
55
|
-
|
56
|
-
raise ex if Helper.test?
|
57
|
-
send_crash(ex)
|
58
|
-
end
|
59
|
-
|
60
|
-
def send_crash(ex)
|
61
|
-
# https://github.com/getsentry/raven-ruby/wiki/Advanced-Configuration
|
62
|
-
require 'raven'
|
63
|
-
require 'json'
|
64
|
-
require 'fastlane_core/crash_reporting/clean_stack_trace'
|
65
|
-
|
66
|
-
Raven.configure do |config|
|
67
|
-
config.dsn = URL
|
68
|
-
config.logger = Logger.new('/dev/null') # we couldn't care less
|
69
|
-
config.sanitize_fields = %w(server_name)
|
70
|
-
config.processors << Raven::Processor::CleanStackTrace
|
71
|
-
end
|
72
|
-
|
73
|
-
Raven::Context.clear! # we don't want to transfer things like the host name
|
74
|
-
crash = Raven.capture_exception(ex)
|
75
|
-
path = "/tmp/sentry_#{crash.id}.json"
|
76
|
-
File.write(path, JSON.pretty_generate(crash.to_hash))
|
77
|
-
puts "Successfully submitted a crash report. If this is a problem with one of the tools specifically,".yellow
|
78
|
-
puts "please submit an issue on GitHub and attach the following number to it: '#{crash.id}'".yellow
|
79
|
-
puts "The crash report has been stored locally '#{path}'".yellow
|
80
|
-
rescue => e
|
81
|
-
UI.verbose(e) # We don't want crash reporting to cause crash
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|