fastlane_core 0.39.1 → 0.40.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/cert_checker.rb +3 -3
- data/lib/fastlane_core/command_executor.rb +1 -1
- data/lib/fastlane_core/configuration/commander_generator.rb +4 -4
- data/lib/fastlane_core/configuration/config_item.rb +18 -8
- data/lib/fastlane_core/configuration/configuration.rb +4 -3
- data/lib/fastlane_core/configuration/configuration_file.rb +1 -1
- data/lib/fastlane_core/crash_reporting/crash_reporting.rb +1 -1
- data/lib/fastlane_core/helper.rb +3 -3
- data/lib/fastlane_core/ipa_upload_package_builder.rb +1 -1
- data/lib/fastlane_core/itunes_search_api.rb +1 -1
- data/lib/fastlane_core/itunes_transporter.rb +27 -27
- data/lib/fastlane_core/pkg_file_analyser.rb +2 -2
- data/lib/fastlane_core/pkg_upload_package_builder.rb +1 -1
- data/lib/fastlane_core/project.rb +18 -20
- data/lib/fastlane_core/provisioning_profile.rb +3 -3
- data/lib/fastlane_core/simulator.rb +8 -8
- data/lib/fastlane_core/ui/implementations/shell.rb +7 -3
- data/lib/fastlane_core/ui/interface.rb +8 -1
- data/lib/fastlane_core/ui/ui.rb +1 -1
- data/lib/fastlane_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa67f5ecf00a2022c691ef679d4228b6173c45ce
|
4
|
+
data.tar.gz: 7e8e9d38e4c0dfa77229e043908fb3ad6d58d87d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0425fc97004b7a2df9b4149e78201ea7a60ffd3eb83dd422e73ea3653e9e3f61d99be37649b087fdf32b75e77234df6a8c91e46b150e52ebc6403a450d172ba
|
7
|
+
data.tar.gz: 0aa390506ad4fad52b3f913661ba7c8fb6cbf90602cf1b49ea39d32cf877aa52d846359a51a5de72ce11e34e1d3fae103a2d0e9a00199787a5332e5f8cd7819a
|
@@ -2,7 +2,7 @@ module FastlaneCore
|
|
2
2
|
# This class checks if a specific certificate is installed on the current mac
|
3
3
|
class CertChecker
|
4
4
|
def self.installed?(path)
|
5
|
-
|
5
|
+
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
|
6
6
|
|
7
7
|
ids = installed_identies
|
8
8
|
finger_print = sha1_fingerprint(path)
|
@@ -68,8 +68,8 @@ module FastlaneCore
|
|
68
68
|
result.delete!(':')
|
69
69
|
return result
|
70
70
|
rescue
|
71
|
-
|
72
|
-
|
71
|
+
UI.message(result)
|
72
|
+
UI.user_error!("Error parsing certificate '#{path}'")
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
@@ -70,10 +70,10 @@ module FastlaneCore
|
|
70
70
|
def validate_short_switch(used_switches, short_switch)
|
71
71
|
return if short_switch.nil?
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
UI.user_error!("Short option #{short_switch} already taken for key #{option.key}") if used_switches.include?(short_switch)
|
74
|
+
UI.user_error!("-v is already used for the version (key #{option.key})") if short_switch == "-v"
|
75
|
+
UI.user_error!("-h is already used for the help screen (key #{option.key})") if short_switch == "-h"
|
76
|
+
UI.user_error!("-t is already used for the trace screen (key #{option.key})") if short_switch == "-t"
|
77
77
|
|
78
78
|
used_switches << short_switch
|
79
79
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module FastlaneCore
|
2
2
|
class ConfigItem
|
3
|
-
attr_accessor :key, :env_name, :description, :short_option, :default_value, :verify_block, :optional, :conflicting_options, :conflict_block
|
3
|
+
attr_accessor :key, :env_name, :description, :short_option, :default_value, :verify_block, :optional, :conflicting_options, :conflict_block, :deprecated
|
4
4
|
|
5
5
|
# Creates a new option
|
6
6
|
# @param key (Symbol) the key which is used as command paramters or key in the fastlane tools
|
@@ -16,26 +16,35 @@ module FastlaneCore
|
|
16
16
|
# @param optional (Boolean) is false by default. If set to true, also string values will not be asked to the user
|
17
17
|
# @param conflicting_options ([]) array of conflicting option keys(@param key). This allows to resolve conflicts intelligently
|
18
18
|
# @param conflict_block an optional block which is called when options conflict happens
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
# @param deprecated (String) Set if the option is deprecated. A deprecated option should be optional and is made optional if the parameter isn't set, and fails otherwise
|
20
|
+
def initialize(key: nil, env_name: nil, description: nil, short_option: nil, default_value: nil, verify_block: nil, is_string: true, type: nil, optional: nil, conflicting_options: nil, conflict_block: nil, deprecated: nil)
|
21
|
+
UI.user_error!("key must be a symbol") unless key.kind_of? Symbol
|
22
|
+
UI.user_error!("env_name must be a String") unless (env_name || '').kind_of? String
|
22
23
|
|
23
24
|
if short_option
|
24
|
-
|
25
|
+
UI.user_error!("short_option must be a String of length 1") unless short_option.kind_of? String and short_option.delete('-').length == 1
|
25
26
|
end
|
26
27
|
if description
|
27
|
-
|
28
|
+
UI.user_error!("Do not let descriptions end with a '.', since it's used for user inputs as well") if description[-1] == '.'
|
28
29
|
end
|
29
30
|
|
30
31
|
if type.to_s.length > 0 and short_option.to_s.length == 0
|
31
|
-
|
32
|
+
UI.user_error!("Type '#{type}' for key '#{key}' requires a short option")
|
32
33
|
end
|
33
34
|
|
34
35
|
if conflicting_options
|
35
36
|
conflicting_options.each do |conflicting_option_key|
|
36
|
-
|
37
|
+
UI.user_error!("Conflicting option key must be a symbol") unless conflicting_option_key.kind_of? Symbol
|
37
38
|
end
|
38
39
|
end
|
40
|
+
if deprecated
|
41
|
+
# deprecated options are automatically optional
|
42
|
+
optional = true if optional.nil?
|
43
|
+
UI.crash!("Deprecated option must be optional") unless optional
|
44
|
+
# deprecated options are marked deprecated in their description
|
45
|
+
description = "[DEPRECATED!] #{deprecated} - #{description}"
|
46
|
+
end
|
47
|
+
optional = false if optional.nil?
|
39
48
|
|
40
49
|
@key = key
|
41
50
|
@env_name = env_name
|
@@ -48,6 +57,7 @@ module FastlaneCore
|
|
48
57
|
@optional = optional
|
49
58
|
@conflicting_options = conflicting_options
|
50
59
|
@conflict_block = conflict_block
|
60
|
+
@deprecated = deprecated
|
51
61
|
end
|
52
62
|
|
53
63
|
# This will raise an exception if the value is not valid
|
@@ -57,6 +57,7 @@ module FastlaneCore
|
|
57
57
|
|
58
58
|
option = option_for_key(key)
|
59
59
|
if option
|
60
|
+
UI.deprecated("Using deprecated option: '--#{key}' (#{option.deprecated})") if option.deprecated
|
60
61
|
option.verify!(value) # Call the verify block for it too
|
61
62
|
else
|
62
63
|
UI.user_error!("Could not find option '#{key}' in the list of available options: #{@available_options.collect(&:key).join(', ')}")
|
@@ -103,7 +104,7 @@ module FastlaneCore
|
|
103
104
|
begin
|
104
105
|
current.conflict_block.call(conflicting_option)
|
105
106
|
rescue => ex
|
106
|
-
|
107
|
+
UI.error("Error resolving conflict between options: '#{current.key}' and '#{conflicting_option.key}'")
|
107
108
|
raise ex
|
108
109
|
end
|
109
110
|
else
|
@@ -123,7 +124,7 @@ module FastlaneCore
|
|
123
124
|
item.verify_block.call(item.default_value)
|
124
125
|
end
|
125
126
|
rescue => ex
|
126
|
-
|
127
|
+
UI.error(ex)
|
127
128
|
UI.user_error!("Invalid default value for #{item.key}, doesn't match verify_block")
|
128
129
|
end
|
129
130
|
end
|
@@ -194,7 +195,7 @@ module FastlaneCore
|
|
194
195
|
end
|
195
196
|
|
196
197
|
while value.nil?
|
197
|
-
|
198
|
+
UI.important("To not be asked about this value, you can specify it using '#{option.key}'")
|
198
199
|
value = ask("#{option.description}: ")
|
199
200
|
# Also store this value to use it from now on
|
200
201
|
begin
|
@@ -25,7 +25,7 @@ module FastlaneCore
|
|
25
25
|
# rubocop:enable Lint/Eval
|
26
26
|
rescue SyntaxError => ex
|
27
27
|
line = ex.to_s.match(/\(eval\):(\d+)/)[1]
|
28
|
-
|
28
|
+
UI.user_error!("Syntax error in your configuration file '#{path}' on line #{line}: #{ex}")
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -78,7 +78,7 @@ module FastlaneCore
|
|
78
78
|
puts "please submit an issue on GitHub and attach the following number to it: '#{crash.id}'".yellow
|
79
79
|
puts "The crash report has been stored locally '#{path}'".yellow
|
80
80
|
rescue => e
|
81
|
-
|
81
|
+
UI.verbose(e) # We don't want crash reporting to cause crash
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
data/lib/fastlane_core/helper.rb
CHANGED
@@ -118,8 +118,8 @@ module FastlaneCore
|
|
118
118
|
output = `DEVELOPER_DIR='' "#{xcode_path}/usr/bin/xcodebuild" -version`
|
119
119
|
@xcode_version = output.split("\n").first.split(' ')[1]
|
120
120
|
rescue => ex
|
121
|
-
|
122
|
-
|
121
|
+
UI.error(ex)
|
122
|
+
UI.error("Error detecting currently used Xcode installation")
|
123
123
|
end
|
124
124
|
@xcode_version
|
125
125
|
end
|
@@ -135,7 +135,7 @@ module FastlaneCore
|
|
135
135
|
result = File.join(self.xcode_path, path)
|
136
136
|
return result if File.exist?(result)
|
137
137
|
end
|
138
|
-
|
138
|
+
UI.user_error!("Could not find transporter at #{self.xcode_path}. Please make sure you set the correct path to your Xcode installation.")
|
139
139
|
end
|
140
140
|
|
141
141
|
def self.fastlane_enabled?
|
@@ -28,7 +28,7 @@ module FastlaneCore
|
|
28
28
|
xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system
|
29
29
|
|
30
30
|
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
31
|
-
|
31
|
+
UI.success("Wrote XML data to '#{self.package_path}'") if $verbose
|
32
32
|
|
33
33
|
return package_path
|
34
34
|
end
|
@@ -46,15 +46,15 @@ module FastlaneCore
|
|
46
46
|
def download(app_id, dir = nil)
|
47
47
|
dir ||= "/tmp"
|
48
48
|
|
49
|
-
|
49
|
+
UI.message("Going to download app metadata from iTunes Connect")
|
50
50
|
command = build_download_command(@user, @password, app_id, dir)
|
51
|
-
|
51
|
+
UI.verbose(build_download_command(@user, 'YourPassword', app_id, dir)) if $verbose
|
52
52
|
|
53
53
|
result = execute_transporter(command)
|
54
54
|
|
55
55
|
itmsp_path = File.join(dir, "#{app_id}.itmsp")
|
56
56
|
if result and File.directory? itmsp_path
|
57
|
-
|
57
|
+
UI.success("Successfully downloaded the latest package from iTunes Connect.")
|
58
58
|
else
|
59
59
|
handle_error(@password)
|
60
60
|
end
|
@@ -71,18 +71,18 @@ module FastlaneCore
|
|
71
71
|
def upload(app_id, dir)
|
72
72
|
dir = File.join(dir, "#{app_id}.itmsp")
|
73
73
|
|
74
|
-
|
75
|
-
|
74
|
+
UI.message("Going to upload updated app to iTunes Connect")
|
75
|
+
UI.success("This might take a few minutes, please don't interrupt the script")
|
76
76
|
|
77
77
|
command = build_upload_command(@user, @password, dir)
|
78
|
-
|
78
|
+
UI.verbose(build_upload_command(@user, 'YourPassword', dir)) if $verbose
|
79
79
|
|
80
80
|
result = execute_transporter(command)
|
81
81
|
|
82
82
|
if result
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
UI.success("-" * 102)
|
84
|
+
UI.success("Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.")
|
85
|
+
UI.success("-" * 102)
|
86
86
|
|
87
87
|
FileUtils.rm_rf(dir) unless Helper.is_test? # we don't need the package any more, since the upload was successful
|
88
88
|
else
|
@@ -97,10 +97,10 @@ module FastlaneCore
|
|
97
97
|
def handle_error(password)
|
98
98
|
# rubocop:disable Style/CaseEquality
|
99
99
|
unless /^[0-9a-zA-Z\.\$\_]*$/ === password
|
100
|
-
|
100
|
+
UI.error("Password contains special characters, which may not be handled properly by iTMSTransporter. If you experience problems uploading to iTunes Connect, please consider changing your password to something with only alphanumeric characters.")
|
101
101
|
end
|
102
102
|
# rubocop:enable Style/CaseEquality
|
103
|
-
|
103
|
+
UI.error("Could not download/upload from iTunes Connect! It's probably related to your password or your internet connection.")
|
104
104
|
end
|
105
105
|
|
106
106
|
def execute_transporter(command)
|
@@ -109,8 +109,8 @@ module FastlaneCore
|
|
109
109
|
|
110
110
|
if defined?@hide_transporter_output
|
111
111
|
# Show a one time message instead
|
112
|
-
|
113
|
-
|
112
|
+
UI.success("Waiting for iTunes Connect transporter to be finished.")
|
113
|
+
UI.success("iTunes Transporter progress... this might take a few minutes...")
|
114
114
|
end
|
115
115
|
|
116
116
|
begin
|
@@ -120,16 +120,16 @@ module FastlaneCore
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
rescue => ex
|
123
|
-
|
123
|
+
UI.error(ex.to_s)
|
124
124
|
@errors << ex.to_s
|
125
125
|
end
|
126
126
|
|
127
127
|
if @warnings.count > 0
|
128
|
-
|
128
|
+
UI.important(@warnings.join("\n"))
|
129
129
|
end
|
130
130
|
|
131
131
|
if @errors.count > 0
|
132
|
-
|
132
|
+
UI.error(@errors.join("\n"))
|
133
133
|
return false
|
134
134
|
end
|
135
135
|
|
@@ -147,7 +147,7 @@ module FastlaneCore
|
|
147
147
|
|
148
148
|
elsif line =~ ERROR_REGEX
|
149
149
|
@errors << $1
|
150
|
-
|
150
|
+
UI.error("[Transporter Error Output]: #{$1}")
|
151
151
|
|
152
152
|
# Check if it's a login error
|
153
153
|
if $1.include? "Your Apple ID or password was entered incorrectly" or
|
@@ -155,35 +155,35 @@ module FastlaneCore
|
|
155
155
|
|
156
156
|
unless Helper.is_test?
|
157
157
|
CredentialsManager::AccountManager.new(user: @user).invalid_credentials
|
158
|
-
|
158
|
+
UI.error("Please run this tool again to apply the new password")
|
159
159
|
end
|
160
160
|
elsif $1.include? "Redundant Binary Upload. There already exists a binary upload with build"
|
161
|
-
|
162
|
-
|
161
|
+
UI.error($1)
|
162
|
+
UI.error("You have to change the build number of your app to upload your ipa file")
|
163
163
|
end
|
164
164
|
|
165
165
|
output_done = true
|
166
166
|
elsif line =~ WARNING_REGEX
|
167
167
|
@warnings << $1
|
168
|
-
|
168
|
+
UI.important("[Transporter Warning Output]: #{$1}")
|
169
169
|
output_done = true
|
170
170
|
end
|
171
171
|
|
172
172
|
if line =~ RETURN_VALUE_REGEX
|
173
173
|
if $1.to_i != 0
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
174
|
+
UI.error("Transporter transfer failed.")
|
175
|
+
UI.important(@warnings.join("\n"))
|
176
|
+
UI.error(@errors.join("\n"))
|
177
|
+
UI.crash!("Return status of iTunes Transporter was #{$1}: #{@errors.join('\n')}")
|
178
178
|
else
|
179
|
-
|
179
|
+
UI.success("iTunes Transporter successfully finished its job")
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
183
183
|
if !defined?@hide_transporter_output and line =~ OUTPUT_REGEX
|
184
184
|
# General logging for debug purposes
|
185
185
|
unless output_done
|
186
|
-
|
186
|
+
UI.verbose("[Transporter]: #{$1}")
|
187
187
|
end
|
188
188
|
end
|
189
189
|
end
|
@@ -30,8 +30,8 @@ module FastlaneCore
|
|
30
30
|
return xml
|
31
31
|
end
|
32
32
|
rescue => ex
|
33
|
-
|
34
|
-
|
33
|
+
UI.error(ex)
|
34
|
+
UI.error("Error parsing *.pkg distribution xml #{File.join(dir, file)}")
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -28,7 +28,7 @@ module FastlaneCore
|
|
28
28
|
xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system
|
29
29
|
|
30
30
|
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
31
|
-
|
31
|
+
UI.success("Wrote XML data to '#{self.package_path}'") if $verbose
|
32
32
|
|
33
33
|
package_path
|
34
34
|
end
|
@@ -5,7 +5,7 @@ module FastlaneCore
|
|
5
5
|
# Project discovery
|
6
6
|
def detect_projects(config)
|
7
7
|
if config[:workspace].to_s.length > 0 and config[:project].to_s.length > 0
|
8
|
-
|
8
|
+
UI.user_error!("You can only pass either a workspace or a project path, not both")
|
9
9
|
end
|
10
10
|
|
11
11
|
return if config[:project].to_s.length > 0
|
@@ -48,10 +48,10 @@ module FastlaneCore
|
|
48
48
|
config[:project] = path
|
49
49
|
break
|
50
50
|
else
|
51
|
-
|
51
|
+
UI.error("Path must end with either .xcworkspace or .xcodeproj")
|
52
52
|
end
|
53
53
|
else
|
54
|
-
|
54
|
+
UI.error("Couldn't find project at path '#{File.expand_path(path)}'")
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -72,7 +72,7 @@ module FastlaneCore
|
|
72
72
|
self.is_workspace = (options[:workspace].to_s.length > 0)
|
73
73
|
|
74
74
|
if !path or !File.directory?(path)
|
75
|
-
|
75
|
+
UI.user_error!("Could not find project at path '#{path}'")
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
@@ -95,12 +95,11 @@ module FastlaneCore
|
|
95
95
|
|
96
96
|
# Let the user select a scheme
|
97
97
|
# Use a scheme containing the preferred_to_include string when multiple schemes were found
|
98
|
-
# rubocop:disable Metrics/AbcSize
|
99
98
|
def select_scheme(preferred_to_include: nil)
|
100
99
|
if options[:scheme].to_s.length > 0
|
101
100
|
# Verify the scheme is available
|
102
101
|
unless schemes.include?(options[:scheme].to_s)
|
103
|
-
|
102
|
+
UI.error("Couldn't find specified scheme '#{options[:scheme]}'.")
|
104
103
|
options[:scheme] = nil
|
105
104
|
end
|
106
105
|
end
|
@@ -118,24 +117,23 @@ module FastlaneCore
|
|
118
117
|
if preferred_to_include and preferred.count == 1
|
119
118
|
options[:scheme] = preferred.last
|
120
119
|
elsif automated_scheme_selection? && schemes.include?(project_name)
|
121
|
-
|
120
|
+
UI.important("Using scheme matching project name (#{project_name}).")
|
122
121
|
options[:scheme] = project_name
|
123
122
|
elsif Helper.is_ci?
|
124
|
-
|
125
|
-
|
126
|
-
|
123
|
+
UI.error("Multiple schemes found but you haven't specified one.")
|
124
|
+
UI.error("Since this is a CI, please pass one using the `scheme` option")
|
125
|
+
UI.user_error!("Multiple schemes found")
|
127
126
|
else
|
128
127
|
puts "Select Scheme: "
|
129
128
|
options[:scheme] = choose(*schemes)
|
130
129
|
end
|
131
130
|
else
|
132
|
-
|
133
|
-
|
131
|
+
UI.error("Couldn't find any schemes in this project, make sure that the scheme is shared if you are using a workspace")
|
132
|
+
UI.error("Open Xcode, click on `Manage Schemes` and check the `Shared` box for the schemes you want to use")
|
134
133
|
|
135
|
-
|
134
|
+
UI.user_error!("No Schemes found")
|
136
135
|
end
|
137
136
|
end
|
138
|
-
# rubocop:enable Metrics/AbcSize
|
139
137
|
|
140
138
|
# Get all available configurations in an array
|
141
139
|
def configurations
|
@@ -211,8 +209,8 @@ module FastlaneCore
|
|
211
209
|
rescue => ex
|
212
210
|
return nil if optional # an optional value, we really don't care if something goes wrong
|
213
211
|
|
214
|
-
|
215
|
-
|
212
|
+
UI.error(caller.join("\n\t"))
|
213
|
+
UI.error("Could not fetch #{key} from project file: #{ex}")
|
216
214
|
end
|
217
215
|
|
218
216
|
nil
|
@@ -260,18 +258,18 @@ module FastlaneCore
|
|
260
258
|
|
261
259
|
options = xcodebuild_parameters.delete_if { |a| a.to_s.include? "scheme" }
|
262
260
|
command = "xcrun xcodebuild -list #{options.join(' ')}"
|
263
|
-
|
261
|
+
UI.important(command) unless silent
|
264
262
|
|
265
263
|
# xcode >= 6 might hang here if the user schemes are missing
|
266
264
|
begin
|
267
265
|
timeout = FastlaneCore::Project.xcode_list_timeout
|
268
266
|
@raw = FastlaneCore::Project.run_command(command, timeout: timeout)
|
269
267
|
rescue Timeout::Error
|
270
|
-
|
271
|
-
" You can override the timeout value with the environment variable FASTLANE_XCODE_LIST_TIMEOUT"
|
268
|
+
UI.user_error!("xcodebuild -list timed-out after #{timeout} seconds. You might need to recreate the user schemes." \
|
269
|
+
" You can override the timeout value with the environment variable FASTLANE_XCODE_LIST_TIMEOUT")
|
272
270
|
end
|
273
271
|
|
274
|
-
|
272
|
+
UI.user_error!("Error parsing xcode file using `#{command}`") if @raw.length == 0
|
275
273
|
|
276
274
|
return @raw
|
277
275
|
end
|
@@ -28,7 +28,7 @@ module FastlaneCore
|
|
28
28
|
if (plist || []).count > 5
|
29
29
|
plist
|
30
30
|
else
|
31
|
-
|
31
|
+
UI.error("Error parsing provisioning profile at path '#{path}'")
|
32
32
|
nil
|
33
33
|
end
|
34
34
|
end
|
@@ -50,7 +50,7 @@ module FastlaneCore
|
|
50
50
|
|
51
51
|
# Installs a provisioning profile for Xcode to use
|
52
52
|
def install(path)
|
53
|
-
|
53
|
+
UI.message("Installing provisioning profile...")
|
54
54
|
profile_filename = uuid(path) + ".mobileprovision"
|
55
55
|
destination = File.join(profiles_path, profile_filename)
|
56
56
|
|
@@ -58,7 +58,7 @@ module FastlaneCore
|
|
58
58
|
# copy to Xcode provisioning profile directory
|
59
59
|
FileUtils.copy(path, destination)
|
60
60
|
unless File.exist?(destination)
|
61
|
-
|
61
|
+
UI.user_error!("Failed installation of provisioning profile at location: '#{destination}'")
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -8,7 +8,7 @@ module FastlaneCore
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def all
|
11
|
-
|
11
|
+
UI.message("Fetching available devices") if $verbose
|
12
12
|
|
13
13
|
@devices = []
|
14
14
|
os_type = 'unknown'
|
@@ -19,8 +19,8 @@ module FastlaneCore
|
|
19
19
|
end
|
20
20
|
|
21
21
|
unless output.include?("== Devices ==")
|
22
|
-
|
23
|
-
|
22
|
+
UI.error("xcrun simctl CLI broken, run `xcrun simctl list devices` and make sure it works")
|
23
|
+
UI.user_error!("xcrun simctl not working.")
|
24
24
|
end
|
25
25
|
|
26
26
|
output.split(/\n/).each do |line|
|
@@ -58,7 +58,7 @@ module FastlaneCore
|
|
58
58
|
|
59
59
|
# The code below works from Xcode 7 on
|
60
60
|
# def all
|
61
|
-
#
|
61
|
+
# UI.message("Fetching available devices") if $verbose
|
62
62
|
|
63
63
|
# @devices = []
|
64
64
|
# output = ''
|
@@ -69,9 +69,9 @@ module FastlaneCore
|
|
69
69
|
# begin
|
70
70
|
# data = JSON.parse(output)
|
71
71
|
# rescue => ex
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
72
|
+
# UI.error(ex)
|
73
|
+
# UI.error("xcrun simctl CLI broken, run `xcrun simctl list devices` and make sure it works")
|
74
|
+
# UI.user_error!("xcrun simctl not working.")
|
75
75
|
# end
|
76
76
|
|
77
77
|
# data["devices"].each do |os_version, l|
|
@@ -118,7 +118,7 @@ module FastlaneCore
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def reset
|
121
|
-
|
121
|
+
UI.message("Resetting #{self}")
|
122
122
|
`xcrun simctl shutdown #{self.udid}` if self.state == "Booted"
|
123
123
|
`xcrun simctl erase #{self.udid}`
|
124
124
|
return
|
@@ -45,6 +45,10 @@ module FastlaneCore
|
|
45
45
|
log.info(message.to_s)
|
46
46
|
end
|
47
47
|
|
48
|
+
def deprecated(message)
|
49
|
+
log.error(message.to_s.bold.blue)
|
50
|
+
end
|
51
|
+
|
48
52
|
def command(message)
|
49
53
|
log.info("$ #{message}".cyan.underline)
|
50
54
|
end
|
@@ -63,9 +67,9 @@ module FastlaneCore
|
|
63
67
|
|
64
68
|
def header(message)
|
65
69
|
i = message.length + 8
|
66
|
-
|
67
|
-
|
68
|
-
|
70
|
+
success("-" * i)
|
71
|
+
success("--- " + message + " ---")
|
72
|
+
success("-" * i)
|
69
73
|
end
|
70
74
|
|
71
75
|
#####################################################
|
@@ -38,6 +38,13 @@ module FastlaneCore
|
|
38
38
|
not_implemented(__method__)
|
39
39
|
end
|
40
40
|
|
41
|
+
# Level Deprecated: Show that a particular function is deprecated
|
42
|
+
#
|
43
|
+
# By default those messages shown in strong blue
|
44
|
+
def deprecated(_message)
|
45
|
+
not_implemented(__method__)
|
46
|
+
end
|
47
|
+
|
41
48
|
# Level Command: Print out a terminal command that is being
|
42
49
|
# executed.
|
43
50
|
#
|
@@ -136,7 +143,7 @@ module FastlaneCore
|
|
136
143
|
# @!group Helpers
|
137
144
|
#####################################################
|
138
145
|
def not_implemented(method_name)
|
139
|
-
|
146
|
+
UI.user_error!("Current UI '#{self}' doesn't support method '#{method_name}'")
|
140
147
|
end
|
141
148
|
|
142
149
|
def to_s
|
data/lib/fastlane_core/ui/ui.rb
CHANGED
@@ -9,7 +9,7 @@ module FastlaneCore
|
|
9
9
|
def self.method_missing(method_sym, *args, &_block)
|
10
10
|
# not using `responds` beacuse we don't care about methods like .to_s and so on
|
11
11
|
interface_methods = Interface.instance_methods - Object.instance_methods
|
12
|
-
|
12
|
+
UI.user_error!("Unknown method '#{method_sym}', supported #{interface_methods}") unless interface_methods.include?(method_sym)
|
13
13
|
|
14
14
|
self.current.send(method_sym, *args)
|
15
15
|
end
|
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.40.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-03-
|
11
|
+
date: 2016-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|