fastlane 2.227.1 → 2.228.0
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/README.md +84 -84
- data/deliver/lib/deliver/runner.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -6
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +11 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +10 -69
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +2 -2
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +3 -3
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane_core/lib/assets/XMLTemplate.xml.erb +5 -1
- data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +4 -14
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +5 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +105 -98
- data/match/lib/match/options.rb +1 -0
- data/pilot/lib/pilot/build_manager.rb +7 -1
- data/scan/lib/scan/options.rb +2 -2
- data/sigh/lib/sigh/options.rb +1 -0
- data/sigh/lib/sigh/runner.rb +5 -2
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +2 -3
- metadata +18 -19
- data/fastlane/lib/fastlane/actions/hipchat.rb +0 -200
@@ -1,200 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
module SharedValues
|
4
|
-
end
|
5
|
-
|
6
|
-
class HipchatAction < Action
|
7
|
-
def self.run(options)
|
8
|
-
require 'net/http'
|
9
|
-
require 'uri'
|
10
|
-
|
11
|
-
api_token = options[:api_token]
|
12
|
-
api_version = options[:version]
|
13
|
-
api_host = options[:api_host]
|
14
|
-
|
15
|
-
message_format = options[:message_format]
|
16
|
-
|
17
|
-
channel = options[:channel]
|
18
|
-
if ['yellow', 'red', 'green', 'purple', 'gray', 'random'].include?(options[:custom_color]) == true
|
19
|
-
color = options[:custom_color]
|
20
|
-
else
|
21
|
-
color = (options[:success] ? 'green' : 'red')
|
22
|
-
end
|
23
|
-
|
24
|
-
from = options[:from]
|
25
|
-
|
26
|
-
message = options[:message]
|
27
|
-
if (message_format == "html") && (options[:include_html_header] == true)
|
28
|
-
message = "<table><tr><td><img src='https://fastlane.tools/assets/img/fastlane_icon.png' width='50' height='50'></td><td>#{message[0..9999]}</td></tr></table>"
|
29
|
-
end
|
30
|
-
|
31
|
-
if api_version.to_i == 1
|
32
|
-
########## running on V1 ##########
|
33
|
-
if user?(channel)
|
34
|
-
UI.user_error!("HipChat private message not working with API V1 please use API V2 instead")
|
35
|
-
else
|
36
|
-
uri = URI.parse("https://#{api_host}/v1/rooms/message")
|
37
|
-
response = Net::HTTP.post_form(uri, { 'from' => from,
|
38
|
-
'auth_token' => api_token,
|
39
|
-
'color' => color,
|
40
|
-
'message_format' => message_format,
|
41
|
-
'room_id' => channel,
|
42
|
-
'message' => message,
|
43
|
-
'notify' => options[:notify_room] ? '1' : '0' })
|
44
|
-
|
45
|
-
check_response_code(response, channel)
|
46
|
-
end
|
47
|
-
else
|
48
|
-
########## running on V2 ##########
|
49
|
-
# Escape channel's name to guarantee it is a valid URL resource.
|
50
|
-
# First of all we verify that the value is not already escaped,
|
51
|
-
# escaping an escaped value will produce a wrong channel name.
|
52
|
-
require 'addressable/uri'
|
53
|
-
escaped_channel = Addressable::URI.encode(channel) == channel ? Addressable::URI.encode(channel) : channel
|
54
|
-
if user?(channel)
|
55
|
-
params = { 'message' => message, 'message_format' => message_format }
|
56
|
-
json_headers = { 'Content-Type' => 'application/json',
|
57
|
-
'Accept' => 'application/json', 'Authorization' => "Bearer #{api_token}" }
|
58
|
-
|
59
|
-
uri = URI.parse("https://#{api_host}/v2/user/#{escaped_channel}/message")
|
60
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
61
|
-
http.use_ssl = true
|
62
|
-
|
63
|
-
response = http.post(uri.path, params.to_json, json_headers)
|
64
|
-
else
|
65
|
-
uri = URI.parse("https://#{api_host}/v2/room/#{escaped_channel}/notification")
|
66
|
-
response = Net::HTTP.post_form(uri, { 'from' => from,
|
67
|
-
'auth_token' => api_token,
|
68
|
-
'color' => color,
|
69
|
-
'message_format' => message_format,
|
70
|
-
'message' => message,
|
71
|
-
'notify' => options[:notify_room] ? 'true' : 'false' })
|
72
|
-
end
|
73
|
-
check_response_code(response, channel)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def self.user?(channel)
|
78
|
-
channel.to_s.start_with?('@')
|
79
|
-
end
|
80
|
-
|
81
|
-
def self.check_response_code(response, channel)
|
82
|
-
case response.code.to_i
|
83
|
-
when 200, 204
|
84
|
-
true
|
85
|
-
when 404
|
86
|
-
UI.user_error!("Channel `#{channel}` not found")
|
87
|
-
when 401
|
88
|
-
UI.user_error!("Access denied for channel `#{channel}`")
|
89
|
-
else
|
90
|
-
UI.user_error!("Unexpected #{response.code} for `#{channel}` with response: #{response.body}")
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
def self.description
|
95
|
-
"Send a error/success message to [HipChat](https://www.hipchat.com/)"
|
96
|
-
end
|
97
|
-
|
98
|
-
def self.available_options
|
99
|
-
[
|
100
|
-
FastlaneCore::ConfigItem.new(key: :message,
|
101
|
-
env_name: "FL_HIPCHAT_MESSAGE",
|
102
|
-
description: "The message to post on HipChat",
|
103
|
-
default_value: ''),
|
104
|
-
FastlaneCore::ConfigItem.new(key: :channel,
|
105
|
-
env_name: "FL_HIPCHAT_CHANNEL",
|
106
|
-
description: "The room or @username"),
|
107
|
-
FastlaneCore::ConfigItem.new(key: :api_token,
|
108
|
-
env_name: "HIPCHAT_API_TOKEN",
|
109
|
-
sensitive: true,
|
110
|
-
description: "Hipchat API Token",
|
111
|
-
verify_block: proc do |value|
|
112
|
-
unless value.to_s.length > 0
|
113
|
-
UI.error("Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.")
|
114
|
-
UI.user_error!("No HIPCHAT_API_TOKEN given.")
|
115
|
-
end
|
116
|
-
end),
|
117
|
-
FastlaneCore::ConfigItem.new(key: :custom_color,
|
118
|
-
env_name: "FL_HIPCHAT_CUSTOM_COLOR",
|
119
|
-
description: "Specify a custom color, this overrides the success boolean. Can be one of 'yellow', 'red', 'green', 'purple', 'gray', or 'random'",
|
120
|
-
optional: true),
|
121
|
-
FastlaneCore::ConfigItem.new(key: :success,
|
122
|
-
env_name: "FL_HIPCHAT_SUCCESS",
|
123
|
-
description: "Was this build successful? (true/false)",
|
124
|
-
optional: true,
|
125
|
-
default_value: true,
|
126
|
-
type: Boolean),
|
127
|
-
FastlaneCore::ConfigItem.new(key: :version,
|
128
|
-
env_name: "HIPCHAT_API_VERSION",
|
129
|
-
description: "Version of the Hipchat API. Must be 1 or 2",
|
130
|
-
verify_block: proc do |value|
|
131
|
-
if value.nil? || ![1, 2].include?(value.to_i)
|
132
|
-
UI.error("Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.")
|
133
|
-
UI.user_error!("No HIPCHAT_API_VERSION given.")
|
134
|
-
end
|
135
|
-
end),
|
136
|
-
FastlaneCore::ConfigItem.new(key: :notify_room,
|
137
|
-
env_name: "HIPCHAT_NOTIFY_ROOM",
|
138
|
-
description: "Should the people in the room be notified? (true/false)",
|
139
|
-
default_value: false,
|
140
|
-
optional: true,
|
141
|
-
type: Boolean),
|
142
|
-
FastlaneCore::ConfigItem.new(key: :api_host,
|
143
|
-
env_name: "HIPCHAT_API_HOST",
|
144
|
-
description: "The host of the HipChat-Server API",
|
145
|
-
default_value: "api.hipchat.com",
|
146
|
-
optional: true),
|
147
|
-
FastlaneCore::ConfigItem.new(key: :message_format,
|
148
|
-
env_name: "FL_HIPCHAT_MESSAGE_FORMAT",
|
149
|
-
description: "Format of the message to post. Must be either 'html' or 'text'",
|
150
|
-
default_value: "html",
|
151
|
-
optional: true,
|
152
|
-
verify_block: proc do |value|
|
153
|
-
unless ["html", "text"].include?(value.to_s)
|
154
|
-
UI.error("Please specify the message format as either 'html' or 'text'.")
|
155
|
-
UI.user_error!("Unrecognized message_format.")
|
156
|
-
end
|
157
|
-
end),
|
158
|
-
FastlaneCore::ConfigItem.new(key: :include_html_header,
|
159
|
-
env_name: "FL_HIPCHAT_INCLUDE_HTML_HEADER",
|
160
|
-
description: "Should html formatted messages include a preformatted header? (true/false)",
|
161
|
-
default_value: true,
|
162
|
-
optional: true,
|
163
|
-
type: Boolean),
|
164
|
-
FastlaneCore::ConfigItem.new(key: :from,
|
165
|
-
env_name: "FL_HIPCHAT_FROM",
|
166
|
-
description: "Name the message will appear to be sent from",
|
167
|
-
default_value: "fastlane",
|
168
|
-
optional: true)
|
169
|
-
]
|
170
|
-
end
|
171
|
-
|
172
|
-
def self.author
|
173
|
-
"jingx23"
|
174
|
-
end
|
175
|
-
|
176
|
-
def self.is_supported?(platform)
|
177
|
-
true
|
178
|
-
end
|
179
|
-
|
180
|
-
def self.details
|
181
|
-
"Send a message to **room** (by default) or a direct message to **@username** with success (green) or failure (red) status."
|
182
|
-
end
|
183
|
-
|
184
|
-
def self.example_code
|
185
|
-
[
|
186
|
-
'hipchat(
|
187
|
-
message: "App successfully released!",
|
188
|
-
message_format: "html", # or "text", defaults to "html"
|
189
|
-
channel: "Room or @username",
|
190
|
-
success: true
|
191
|
-
)'
|
192
|
-
]
|
193
|
-
end
|
194
|
-
|
195
|
-
def self.category
|
196
|
-
:notifications
|
197
|
-
end
|
198
|
-
end
|
199
|
-
end
|
200
|
-
end
|