fastlane 2.71.0.beta.20171219010003 → 2.71.0.beta.20171220010004
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 +4 -4
- data/fastlane/lib/fastlane/actions/danger.rb +7 -0
- data/fastlane/lib/fastlane/actions/get_build_number.rb +4 -0
- data/fastlane/lib/fastlane/actions/git_branch.rb +4 -0
- data/fastlane/lib/fastlane/actions/slack.rb +24 -9
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Fastlane.swift +4 -4
- data/fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +12 -7
- data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +44 -3
- 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: 5b0f28e3d854336011733cad2052ccf36787cb3f
|
4
|
+
data.tar.gz: 32ab90aa7fc301ecc5025ba4bcb6ccdad23d7a38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d746c80610c2316b7f52070b5d7316a34a53048b5bf22d135fa9ce4c7d55465c69fc7c197871c62d35c03b7d87c089da17a86d2dcf49fc9ea1b204a11256073
|
7
|
+
data.tar.gz: 8d3afe3ef6d4e1eb40aeb7a581856f6ece407b417be4b9895eb3690537a6f8f6a0081df8534220a79a1e3ea9a4163b7fc6f4259e98be1e432267978684017cb1
|
@@ -13,12 +13,14 @@ module Fastlane
|
|
13
13
|
dangerfile = params[:dangerfile]
|
14
14
|
base = params[:base]
|
15
15
|
head = params[:head]
|
16
|
+
pr = params[:pr]
|
16
17
|
cmd << "--danger_id=#{danger_id}" if danger_id
|
17
18
|
cmd << "--dangerfile=#{dangerfile}" if dangerfile
|
18
19
|
cmd << "--fail-on-errors=true" if params[:fail_on_errors]
|
19
20
|
cmd << "--new-comment" if params[:new_comment]
|
20
21
|
cmd << "--base=#{base}" if base
|
21
22
|
cmd << "--head=#{head}" if head
|
23
|
+
cmd << "pr #{pr}" if pr
|
22
24
|
|
23
25
|
ENV['DANGER_GITHUB_API_TOKEN'] = params[:github_api_token] if params[:github_api_token]
|
24
26
|
|
@@ -85,6 +87,11 @@ module Fastlane
|
|
85
87
|
env_name: "FL_DANGER_HEAD",
|
86
88
|
description: "A branch/tag/commit to use as the head. [master|dev|stable]",
|
87
89
|
is_string: true,
|
90
|
+
optional: true),
|
91
|
+
FastlaneCore::ConfigItem.new(key: :pr,
|
92
|
+
env_name: "FL_DANGER_PR",
|
93
|
+
description: "Run danger on a specific pull request. e.g. \"https://github.com/danger/danger/pull/518\"",
|
94
|
+
is_string: true,
|
88
95
|
optional: true)
|
89
96
|
]
|
90
97
|
end
|
@@ -38,15 +38,24 @@ module Fastlane
|
|
38
38
|
|
39
39
|
return [notifier, slack_attachment] if Helper.is_test? # tests will verify the slack attachments and other properties
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
UI.
|
47
|
-
|
48
|
-
|
49
|
-
|
41
|
+
begin
|
42
|
+
result = notifier.ping '',
|
43
|
+
icon_url: icon_url,
|
44
|
+
attachments: [slack_attachment]
|
45
|
+
rescue => exception
|
46
|
+
UI.error("Exception: #{exception}")
|
47
|
+
ensure
|
48
|
+
if !result.nil? && result.code.to_i == 200
|
49
|
+
UI.success('Successfully sent Slack notification')
|
50
|
+
else
|
51
|
+
UI.verbose(result) unless result.nil?
|
52
|
+
message = "Error pushing Slack message, maybe the integration has no permission to post on this channel? Try removing the channel parameter in your Fastfile, this is usually caused by a misspelled or changed group/channel name or an expired SLACK_URL"
|
53
|
+
if options[:fail_on_error]
|
54
|
+
UI.user_error!(message)
|
55
|
+
else
|
56
|
+
UI.error(message)
|
57
|
+
end
|
58
|
+
end
|
50
59
|
end
|
51
60
|
end
|
52
61
|
|
@@ -109,6 +118,12 @@ module Fastlane
|
|
109
118
|
description: "Was this build successful? (true/false)",
|
110
119
|
optional: true,
|
111
120
|
default_value: true,
|
121
|
+
is_string: false),
|
122
|
+
FastlaneCore::ConfigItem.new(key: :fail_on_error,
|
123
|
+
env_name: "FL_SLACK_FAIL_ON_ERROR",
|
124
|
+
description: "Should an error sending the slack notification cause a failure? (true/false)",
|
125
|
+
optional: true,
|
126
|
+
default_value: true,
|
112
127
|
is_string: false)
|
113
128
|
]
|
114
129
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Fastlane
|
2
|
-
VERSION = '2.71.0.beta.
|
2
|
+
VERSION = '2.71.0.beta.20171220010004'.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 = '0.49.1'.freeze
|
@@ -1393,9 +1393,9 @@ func gcovr() {
|
|
1393
1393
|
let command = RubyCommand(commandID: "", methodName: "gcovr", className: nil, args: [])
|
1394
1394
|
_ = runner.executeCommand(command)
|
1395
1395
|
}
|
1396
|
-
func getBuildNumber(xcodeproj: String? = nil) {
|
1396
|
+
@discardableResult func getBuildNumber(xcodeproj: String? = nil) -> String {
|
1397
1397
|
let command = RubyCommand(commandID: "", methodName: "get_build_number", className: nil, args: [RubyCommand.Argument(name: "xcodeproj", value: xcodeproj)])
|
1398
|
-
|
1398
|
+
return runner.executeCommand(command)
|
1399
1399
|
}
|
1400
1400
|
func getBuildNumberRepository(useHgRevisionNumber: Bool = false) {
|
1401
1401
|
let command = RubyCommand(commandID: "", methodName: "get_build_number_repository", className: nil, args: [RubyCommand.Argument(name: "use_hg_revision_number", value: useHgRevisionNumber)])
|
@@ -1525,9 +1525,9 @@ func gitAdd(path: String? = nil,
|
|
1525
1525
|
RubyCommand.Argument(name: "pathspec", value: pathspec)])
|
1526
1526
|
_ = runner.executeCommand(command)
|
1527
1527
|
}
|
1528
|
-
func gitBranch() {
|
1528
|
+
@discardableResult func gitBranch() -> String {
|
1529
1529
|
let command = RubyCommand(commandID: "", methodName: "git_branch", className: nil, args: [])
|
1530
|
-
|
1530
|
+
return runner.executeCommand(command)
|
1531
1531
|
}
|
1532
1532
|
func gitCommit(path: String,
|
1533
1533
|
message: String) {
|
@@ -20,7 +20,7 @@ module FastlaneCore
|
|
20
20
|
app_id_guesser = FastlaneCore::AppIdentifierGuesser.new(args: args)
|
21
21
|
return self.new(
|
22
22
|
action_name: action_name,
|
23
|
-
p_hash: app_id_guesser.p_hash,
|
23
|
+
p_hash: app_id_guesser.p_hash || UNKNOWN_P_HASH,
|
24
24
|
platform: app_id_guesser.platform,
|
25
25
|
configuration_language: configuration_language
|
26
26
|
)
|
@@ -163,14 +163,9 @@ module FastlaneCore
|
|
163
163
|
|
164
164
|
self.config_file_name = config_file_name
|
165
165
|
|
166
|
-
|
167
|
-
|
168
|
-
paths += Dir["./.fastlane/#{self.config_file_name}"]
|
169
|
-
paths += Dir["./#{self.config_file_name}"]
|
170
|
-
paths += Dir["./fastlane_core/spec/fixtures/#{self.config_file_name}"] if Helper.is_test?
|
171
|
-
return if paths.count == 0
|
166
|
+
path = FastlaneCore::Configuration.find_configuration_file_path(config_file_name: config_file_name)
|
167
|
+
return if path.nil?
|
172
168
|
|
173
|
-
path = paths.first
|
174
169
|
begin
|
175
170
|
configuration_file = ConfigurationFile.new(self, path, block_for_missing, skip_printing_values)
|
176
171
|
options = configuration_file.options
|
@@ -196,6 +191,16 @@ module FastlaneCore
|
|
196
191
|
configuration_file
|
197
192
|
end
|
198
193
|
|
194
|
+
def self.find_configuration_file_path(config_file_name: nil)
|
195
|
+
paths = []
|
196
|
+
paths += Dir["./fastlane/#{config_file_name}"]
|
197
|
+
paths += Dir["./.fastlane/#{config_file_name}"]
|
198
|
+
paths += Dir["./#{config_file_name}"]
|
199
|
+
paths += Dir["./fastlane_core/spec/fixtures/#{config_file_name}"] if Helper.is_test?
|
200
|
+
return nil if paths.count == 0
|
201
|
+
return paths.first
|
202
|
+
end
|
203
|
+
|
199
204
|
#####################################################
|
200
205
|
# @!group Actually using the class
|
201
206
|
#####################################################
|
@@ -141,7 +141,7 @@ module FastlaneCore
|
|
141
141
|
# @return the full path to the Xcode developer tools of the currently
|
142
142
|
# running system
|
143
143
|
def self.xcode_path
|
144
|
-
return ""
|
144
|
+
return "" unless self.is_mac?
|
145
145
|
`xcode-select -p`.delete("\n") + "/"
|
146
146
|
end
|
147
147
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module FastlaneCore
|
2
2
|
class IOSAppIdentifierGuesser
|
3
|
+
APP_ID_REGEX = /var\s*appIdentifier:\s*String\?{0,1}\s*\[?\]?\s*{\s*return\s*\[?\s*"(\s*[a-zA-Z.-]+\s*)"\s*\]?\s*}/
|
3
4
|
class << self
|
4
5
|
def guess_app_identifier_from_args(args)
|
5
6
|
# args example: ["-a", "com.krausefx.app", "--team_id", "5AA97AAHK2"]
|
@@ -24,7 +25,7 @@ module FastlaneCore
|
|
24
25
|
CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
|
25
26
|
end
|
26
27
|
|
27
|
-
def
|
28
|
+
def fetch_app_identifier_from_ruby_file(file_name)
|
28
29
|
# we only care about the app_identifier item in the configuration file, so
|
29
30
|
# build an options array & Configuration with just that one key and it will
|
30
31
|
# be fetched if it is present in the config file
|
@@ -41,12 +42,52 @@ module FastlaneCore
|
|
41
42
|
nil
|
42
43
|
end
|
43
44
|
|
45
|
+
def fetch_app_identifier_from_swift_file(file_name)
|
46
|
+
swift_config_file_path = FastlaneCore::Configuration.find_configuration_file_path(config_file_name: file_name)
|
47
|
+
return nil if swift_config_file_path.nil?
|
48
|
+
|
49
|
+
# Deliverfile.swift, Snapfile.swift, Appfile.swift all look like:
|
50
|
+
# var appIdentifier: String? { return nil }
|
51
|
+
# var appIdentifier: String { return "" }
|
52
|
+
|
53
|
+
# Matchfile.swift is the odd one out
|
54
|
+
# var appIdentifier: [String] { return [] }
|
55
|
+
#
|
56
|
+
|
57
|
+
swift_config_file_path = File.expand_path(swift_config_file_path)
|
58
|
+
swift_config_content = File.read(swift_config_file_path)
|
59
|
+
|
60
|
+
swift_config_content.split("\n").reject(&:empty?).each do |line|
|
61
|
+
application_id = match_swift_application_id(text_line: line)
|
62
|
+
return application_id if application_id
|
63
|
+
end
|
64
|
+
return nil
|
65
|
+
rescue
|
66
|
+
# any option/file error here should just be treated as identifier not found
|
67
|
+
return nil
|
68
|
+
end
|
69
|
+
|
70
|
+
def match_swift_application_id(text_line: nil)
|
71
|
+
text_line.strip!
|
72
|
+
application_id_match = APP_ID_REGEX.match(text_line)
|
73
|
+
return application_id_match[1].strip if application_id_match
|
74
|
+
|
75
|
+
return nil
|
76
|
+
end
|
77
|
+
|
44
78
|
def guess_app_identifier_from_config_files
|
45
79
|
["Deliverfile", "Gymfile", "Snapfile", "Matchfile"].each do |current|
|
46
|
-
app_identifier = self.
|
80
|
+
app_identifier = self.fetch_app_identifier_from_ruby_file(current)
|
47
81
|
return app_identifier if app_identifier
|
48
82
|
end
|
49
|
-
|
83
|
+
|
84
|
+
# if we're swifty, let's look there
|
85
|
+
# this isn't the same list as above
|
86
|
+
["Deliverfile.swift", "Snapfile.swift", "Appfile.swift", "Matchfile.swift"].each do |current|
|
87
|
+
app_identifier = self.fetch_app_identifier_from_swift_file(current)
|
88
|
+
return app_identifier if app_identifier
|
89
|
+
end
|
90
|
+
return nil
|
50
91
|
end
|
51
92
|
|
52
93
|
# make a best-guess for the app_identifier for this project, using most-reliable signals
|
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.71.0.beta.
|
4
|
+
version: 2.71.0.beta.20171220010004
|
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-12-
|
18
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|