fastlane 2.241.1 → 2.242.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 +39 -39
- data/cert/lib/cert/runner.rb +1 -1
- data/credentials_manager/README.md +3 -3
- data/credentials_manager/lib/credentials_manager/account_manager.rb +13 -3
- data/deliver/lib/deliver/runner.rb +5 -0
- data/fastlane/lib/assets/certificates/AppleIncRootCertificate.cer +0 -0
- data/fastlane/lib/assets/certificates/AppleRootCA-G3.cer +0 -0
- data/fastlane/lib/fastlane/action.rb +8 -6
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +0 -3
- data/fastlane/lib/fastlane/actions/clipboard.rb +1 -1
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +0 -1
- data/fastlane/lib/fastlane/actions/create_keychain.rb +20 -29
- data/fastlane/lib/fastlane/actions/delete_keychain.rb +5 -3
- data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +4 -4
- data/fastlane/lib/fastlane/actions/docs/get_provisioning_profile.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +12 -0
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +5 -4
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +3 -1
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -0
- data/fastlane/lib/fastlane/actions/git_pull.rb +1 -1
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +0 -1
- data/fastlane/lib/fastlane/actions/import_certificate.rb +18 -6
- data/fastlane/lib/fastlane/actions/import_from_gem.rb +70 -0
- data/fastlane/lib/fastlane/actions/jazzy.rb +1 -1
- data/fastlane/lib/fastlane/actions/lcov.rb +1 -1
- data/fastlane/lib/fastlane/actions/mailgun.rb +2 -2
- data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
- data/fastlane/lib/fastlane/actions/notarize.rb +55 -7
- data/fastlane/lib/fastlane/actions/prompt.rb +1 -1
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +2 -2
- data/fastlane/lib/fastlane/actions/sh.rb +20 -2
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +2 -2
- data/fastlane/lib/fastlane/actions/swiftlint.rb +5 -2
- data/fastlane/lib/fastlane/actions/unlock_keychain.rb +17 -29
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +10 -3
- data/fastlane/lib/fastlane/actions/update_project_code_signing.rb +2 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +21 -18
- data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +8 -2
- data/fastlane/lib/fastlane/actions/verify_build.rb +2 -1
- data/fastlane/lib/fastlane/actions/verify_pod_keys.rb +2 -1
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +1 -1
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +7 -0
- data/fastlane/lib/fastlane/commands_generator.rb +7 -1
- data/fastlane/lib/fastlane/environment_printer.rb +14 -14
- data/fastlane/lib/fastlane/fast_file.rb +35 -4
- data/fastlane/lib/fastlane/helper/sh_helper.rb +27 -45
- data/fastlane/lib/fastlane/lane_list.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -2
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +0 -2
- data/fastlane/lib/fastlane/runner.rb +4 -6
- data/fastlane/lib/fastlane/server/socket_server.rb +57 -7
- data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +4 -4
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -3
- data/fastlane/lib/fastlane/swift_lane_manager.rb +32 -11
- data/fastlane/lib/fastlane/version.rb +2 -1
- data/fastlane/swift/ArgumentProcessor.swift +10 -2
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +46 -152
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/MainProcess.swift +27 -0
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +1 -9
- data/fastlane/swift/RubyCommandable.swift +3 -2
- data/fastlane/swift/Runner.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- 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/swift/main.swift +1 -1
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +40 -76
- data/fastlane_core/lib/fastlane_core/command_executor.rb +128 -7
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +1 -1
- data/fastlane_core/lib/fastlane_core/device_manager.rb +14 -5
- data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +25 -10
- data/fastlane_core/lib/fastlane_core/helper.rb +26 -2
- data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +1 -1
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +41 -22
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +48 -71
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -1
- data/fastlane_core/lib/fastlane_core/print_table.rb +1 -1
- data/fastlane_core/lib/fastlane_core/queue_worker.rb +0 -2
- data/fastlane_core/lib/fastlane_core/stored_passwords.rb +29 -0
- data/fastlane_core/lib/fastlane_core/string_filters.rb +1 -2
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +8 -4
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +2 -2
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +1 -1
- data/frameit/lib/frameit/device_types.rb +11 -4
- data/frameit/lib/frameit/editor.rb +31 -12
- data/frameit/lib/frameit/frame_downloader.rb +4 -1
- data/gym/lib/gym/detect_values.rb +10 -10
- data/gym/lib/gym/options.rb +1 -7
- data/gym/lib/gym/runner.rb +6 -1
- data/match/lib/match/encryption/encryption.rb +6 -1
- data/match/lib/match/encryption/openssl.rb +8 -3
- data/match/lib/match/portal_fetcher.rb +12 -6
- data/match/lib/match/runner.rb +4 -1
- data/match/lib/match/storage/gitlab/secure_file.rb +2 -1
- data/match/lib/match/storage/google_cloud_storage.rb +1 -1
- data/match/lib/match/storage/interface.rb +10 -0
- data/match/lib/match/storage/s3_storage.rb +1 -1
- data/pem/lib/pem/manager.rb +3 -3
- data/precheck/lib/precheck/runner.rb +4 -2
- data/scan/lib/scan/detect_values.rb +0 -1
- data/scan/lib/scan/runner.rb +1 -0
- data/sigh/lib/assets/resign.sh +10 -3
- data/sigh/lib/sigh/manager.rb +5 -1
- data/sigh/lib/sigh/resign.rb +5 -21
- data/snapshot/lib/snapshot/reset_simulators.rb +5 -2
- data/snapshot/lib/snapshot/runner.rb +0 -1
- data/spaceship/lib/spaceship/base.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +13 -4
- data/spaceship/lib/spaceship/connect_api/api_client.rb +12 -14
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/user.rb +7 -3
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +9 -11
- data/spaceship/lib/spaceship/connect_api/token.rb +21 -1
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +3 -1
- data/spaceship/lib/spaceship/helper/plist_middleware.rb +2 -2
- data/spaceship/lib/spaceship/portal/portal_client.rb +8 -8
- data/spaceship/lib/spaceship/test_flight/client.rb +1 -5
- data/supply/lib/supply/client.rb +1 -1
- data/supply/lib/supply/options.rb +6 -0
- data/supply/lib/supply/uploader.rb +28 -2
- metadata +28 -25
- data/fastlane/lib/fastlane/actions/hockey.rb +0 -400
- data/fastlane/lib/fastlane/actions/typetalk.rb +0 -93
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
module Fastlane
|
|
2
|
-
module Actions
|
|
3
|
-
module SharedValues
|
|
4
|
-
HOCKEY_DOWNLOAD_LINK = :HOCKEY_DOWNLOAD_LINK
|
|
5
|
-
HOCKEY_BUILD_INFORMATION = :HOCKEY_BUILD_INFORMATION # contains all keys/values from the HockeyApp API, like :title, :bundle_identifier
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
# rubocop:disable Metrics/ClassLength
|
|
9
|
-
class HockeyAction < Action
|
|
10
|
-
def self.connection(options)
|
|
11
|
-
require 'faraday'
|
|
12
|
-
require 'faraday/multipart'
|
|
13
|
-
require 'faraday/follow_redirects'
|
|
14
|
-
|
|
15
|
-
base_url = options.delete(:bypass_cdn) ? "https://rink.hockeyapp.net" : "https://upload.hockeyapp.net"
|
|
16
|
-
foptions = {
|
|
17
|
-
url: base_url
|
|
18
|
-
}
|
|
19
|
-
Faraday.new(foptions) do |builder|
|
|
20
|
-
builder.request(:multipart)
|
|
21
|
-
builder.request(:url_encoded)
|
|
22
|
-
builder.response(:json, content_type: /\bjson$/)
|
|
23
|
-
builder.response(:follow_redirects)
|
|
24
|
-
builder.adapter(:net_http)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def self.upload(api_token, ipa, options)
|
|
29
|
-
create_update = options.delete(:create_update)
|
|
30
|
-
|
|
31
|
-
if create_update
|
|
32
|
-
self.create_and_update_build(api_token, ipa, options)
|
|
33
|
-
else
|
|
34
|
-
self.upload_build(api_token, ipa, options)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# Uses https://support.hockeyapp.net/kb/api/api-versions#upload-version if a `public_identifier` was specified
|
|
39
|
-
# otherwise https://support.hockeyapp.net/kb/api/api-apps#upload-app
|
|
40
|
-
def self.upload_build(api_token, ipa, options)
|
|
41
|
-
connection = self.connection(options)
|
|
42
|
-
|
|
43
|
-
options[:ipa] = Faraday::UploadIO.new(ipa, 'application/octet-stream') if ipa && File.exist?(ipa)
|
|
44
|
-
|
|
45
|
-
dsym_filename = options.delete(:dsym_filename)
|
|
46
|
-
if dsym_filename
|
|
47
|
-
options[:dsym] = Faraday::UploadIO.new(dsym_filename, 'application/octet-stream')
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
connection.post do |req|
|
|
51
|
-
req.options.timeout = options.delete(:timeout)
|
|
52
|
-
if options[:public_identifier].nil?
|
|
53
|
-
req.url("/api/2/apps/upload")
|
|
54
|
-
else
|
|
55
|
-
req.url("/api/2/apps/#{options.delete(:public_identifier)}/app_versions/upload")
|
|
56
|
-
end
|
|
57
|
-
req.headers['X-HockeyAppToken'] = api_token
|
|
58
|
-
req.body = options
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Uses https://support.hockeyapp.net/kb/api/api-versions#create-version
|
|
63
|
-
# and https://support.hockeyapp.net/kb/api/api-versions#update-version
|
|
64
|
-
# to upload a build
|
|
65
|
-
def self.create_and_update_build(api_token, ipa, options)
|
|
66
|
-
[:public_identifier, :bundle_short_version, :bundle_version].each do |key|
|
|
67
|
-
UI.user_error!("To use the 'create_update' upload mechanism you need to pass the '#{key.to_sym}' option.") unless options[key]
|
|
68
|
-
end
|
|
69
|
-
# https://support.hockeyapp.net/discussions/problems/33355-is-uploadhockeyappnet-available-for-general-use
|
|
70
|
-
# GET requests are cached on CDN, so bypass it
|
|
71
|
-
options[:bypass_cdn] = true
|
|
72
|
-
connection = self.connection(options)
|
|
73
|
-
|
|
74
|
-
options.delete(:ipa)
|
|
75
|
-
options.delete(:apk)
|
|
76
|
-
app_id = options.delete(:public_identifier)
|
|
77
|
-
|
|
78
|
-
ipaio = Faraday::UploadIO.new(ipa, 'application/octet-stream') if ipa && File.exist?(ipa)
|
|
79
|
-
dsym = options.delete(:dsym)
|
|
80
|
-
|
|
81
|
-
if dsym
|
|
82
|
-
dsym_io = Faraday::UploadIO.new(dsym, 'application/octet-stream') if dsym && File.exist?(dsym)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# https://support.hockeyapp.net/discussions/problems/83559
|
|
86
|
-
# Should not set status to "2" (downloadable) until after the app is uploaded, so allow the caller
|
|
87
|
-
# to specify a different status for the `create` step
|
|
88
|
-
update_status = options[:status]
|
|
89
|
-
options[:status] = options[:create_status]
|
|
90
|
-
|
|
91
|
-
response = connection.get do |req|
|
|
92
|
-
req.url("/api/2/apps/#{app_id}/app_versions/new")
|
|
93
|
-
req.headers['X-HockeyAppToken'] = api_token
|
|
94
|
-
req.body = options
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
case response.status
|
|
98
|
-
when 200...300
|
|
99
|
-
app_version_id = response.body['id']
|
|
100
|
-
UI.message("successfully created version with id #{app_version_id}")
|
|
101
|
-
else
|
|
102
|
-
UI.user_error!("Error trying to create app version: #{response.status} - #{response.body}")
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
options[:ipa] = ipaio
|
|
106
|
-
|
|
107
|
-
if dsym
|
|
108
|
-
options[:dsym] = dsym_io
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
options[:status] = update_status
|
|
112
|
-
|
|
113
|
-
connection.put do |req|
|
|
114
|
-
req.options.timeout = options.delete(:timeout)
|
|
115
|
-
req.url("/api/2/apps/#{app_id}/app_versions/#{app_version_id}")
|
|
116
|
-
req.headers['X-HockeyAppToken'] = api_token
|
|
117
|
-
req.body = options
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
def self.run(options)
|
|
122
|
-
build_file = [
|
|
123
|
-
options[:ipa],
|
|
124
|
-
options[:apk]
|
|
125
|
-
].detect { |e| !e.to_s.empty? }
|
|
126
|
-
|
|
127
|
-
if options[:dsym]
|
|
128
|
-
dsym_filename = options[:dsym]
|
|
129
|
-
else
|
|
130
|
-
|
|
131
|
-
if build_file.nil?
|
|
132
|
-
UI.user_error!("You have to provide a build file (params 'apk' or 'ipa')")
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
if options[:ipa].to_s.end_with?(".ipa")
|
|
136
|
-
dsym_path = options[:ipa].to_s.gsub('.ipa', '.app.dSYM.zip')
|
|
137
|
-
if File.exist?(dsym_path)
|
|
138
|
-
dsym_filename = dsym_path
|
|
139
|
-
else
|
|
140
|
-
UI.important("Symbols not found on path #{File.expand_path(dsym_path)}. Crashes won't be symbolicated properly")
|
|
141
|
-
dsym_filename = nil
|
|
142
|
-
end
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
UI.user_error!("Symbols on path '#{File.expand_path(dsym_filename)}' not found") if dsym_filename && !File.exist?(dsym_filename)
|
|
147
|
-
|
|
148
|
-
if options[:upload_dsym_only]
|
|
149
|
-
UI.success('Starting with dSYM upload to HockeyApp... this could take some time.')
|
|
150
|
-
else
|
|
151
|
-
UI.success('Starting with file(s) upload to HockeyApp... this could take some time.')
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
values = options.values
|
|
155
|
-
values[:dsym_filename] = dsym_filename
|
|
156
|
-
values[:notes_type] = options[:notes_type]
|
|
157
|
-
|
|
158
|
-
api_token = values.delete(:api_token)
|
|
159
|
-
|
|
160
|
-
values.delete_if { |k, v| v.nil? }
|
|
161
|
-
|
|
162
|
-
return values if Helper.test?
|
|
163
|
-
|
|
164
|
-
ipa_filename = build_file
|
|
165
|
-
ipa_filename = nil if options[:upload_dsym_only]
|
|
166
|
-
|
|
167
|
-
response = self.upload(api_token, ipa_filename, values)
|
|
168
|
-
case response.status
|
|
169
|
-
when 200...300
|
|
170
|
-
url = response.body['public_url']
|
|
171
|
-
|
|
172
|
-
Actions.lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK] = url
|
|
173
|
-
Actions.lane_context[SharedValues::HOCKEY_BUILD_INFORMATION] = response.body
|
|
174
|
-
|
|
175
|
-
UI.message("Public Download URL: #{url}") if url
|
|
176
|
-
UI.success('Build successfully uploaded to HockeyApp!')
|
|
177
|
-
else
|
|
178
|
-
if response.body.to_s.include?("App could not be created")
|
|
179
|
-
UI.user_error!("Hockey has an issue processing this app. Please confirm that an app in Hockey matches this IPA's bundle ID or that you are using the correct API upload token. If error persists, please provide the :public_identifier option from the HockeyApp website. More information https://github.com/fastlane/fastlane/issues/400")
|
|
180
|
-
else
|
|
181
|
-
UI.user_error!("Error when trying to upload file(s) to HockeyApp: #{response.status} - #{response.body}")
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
def self.description
|
|
187
|
-
"Refer to [App Center](https://github.com/Microsoft/fastlane-plugin-appcenter/)"
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
def self.available_options
|
|
191
|
-
[
|
|
192
|
-
FastlaneCore::ConfigItem.new(key: :apk,
|
|
193
|
-
env_name: "FL_HOCKEY_APK",
|
|
194
|
-
description: "Path to your APK file",
|
|
195
|
-
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
|
|
196
|
-
default_value_dynamic: true,
|
|
197
|
-
optional: true,
|
|
198
|
-
verify_block: proc do |value|
|
|
199
|
-
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
|
200
|
-
end,
|
|
201
|
-
conflicting_options: [:ipa],
|
|
202
|
-
conflict_block: proc do |value|
|
|
203
|
-
UI.user_error!("You can't use 'apk' and '#{value.key}' options in one run")
|
|
204
|
-
end),
|
|
205
|
-
FastlaneCore::ConfigItem.new(key: :api_token,
|
|
206
|
-
env_name: "FL_HOCKEY_API_TOKEN",
|
|
207
|
-
sensitive: true,
|
|
208
|
-
description: "API Token for Hockey Access",
|
|
209
|
-
verify_block: proc do |value|
|
|
210
|
-
UI.user_error!("No API token for Hockey given, pass using `api_token: 'token'`") unless value && !value.empty?
|
|
211
|
-
end),
|
|
212
|
-
FastlaneCore::ConfigItem.new(key: :ipa,
|
|
213
|
-
env_name: "FL_HOCKEY_IPA",
|
|
214
|
-
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action. For Mac zip the .app. For Android provide path to .apk file. In addition you could use this to upload .msi, .zip, .pkg, etc if you use the 'create_update' mechanism",
|
|
215
|
-
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
|
216
|
-
default_value_dynamic: true,
|
|
217
|
-
optional: true,
|
|
218
|
-
verify_block: proc do |value|
|
|
219
|
-
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
|
220
|
-
end,
|
|
221
|
-
conflicting_options: [:apk],
|
|
222
|
-
conflict_block: proc do |value|
|
|
223
|
-
UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
|
|
224
|
-
end),
|
|
225
|
-
FastlaneCore::ConfigItem.new(key: :dsym,
|
|
226
|
-
env_name: "FL_HOCKEY_DSYM",
|
|
227
|
-
description: "Path to your symbols file. For iOS and Mac provide path to app.dSYM.zip. For Android provide path to mappings.txt file",
|
|
228
|
-
default_value: Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH],
|
|
229
|
-
default_value_dynamic: true,
|
|
230
|
-
optional: true),
|
|
231
|
-
FastlaneCore::ConfigItem.new(key: :create_update,
|
|
232
|
-
env_name: "FL_HOCKEY_CREATE_UPDATE",
|
|
233
|
-
description: "Set true if you want to create then update your app as opposed to just upload it."\
|
|
234
|
-
" You will need the 'public_identifier', 'bundle_version' and 'bundle_short_version'",
|
|
235
|
-
type: Boolean,
|
|
236
|
-
default_value: false),
|
|
237
|
-
FastlaneCore::ConfigItem.new(key: :notes,
|
|
238
|
-
env_name: "FL_HOCKEY_NOTES",
|
|
239
|
-
description: "Beta Notes",
|
|
240
|
-
default_value: Actions.lane_context[SharedValues::FL_CHANGELOG] || "No changelog given",
|
|
241
|
-
default_value_dynamic: true),
|
|
242
|
-
FastlaneCore::ConfigItem.new(key: :notify,
|
|
243
|
-
env_name: "FL_HOCKEY_NOTIFY",
|
|
244
|
-
description: "Notify testers? \"1\" for yes",
|
|
245
|
-
default_value: "1"),
|
|
246
|
-
FastlaneCore::ConfigItem.new(key: :status,
|
|
247
|
-
env_name: "FL_HOCKEY_STATUS",
|
|
248
|
-
description: "Download status: \"1\" = No user can download; \"2\" = Available for download (only possible with full-access token)",
|
|
249
|
-
default_value: "2"),
|
|
250
|
-
FastlaneCore::ConfigItem.new(key: :create_status,
|
|
251
|
-
env_name: "FL_HOCKEY_CREATE_STATUS",
|
|
252
|
-
description: "Download status for initial version creation when create_update is true: \"1\" = No user can download; \"2\" = Available for download (only possible with full-access token)",
|
|
253
|
-
default_value: "2"),
|
|
254
|
-
FastlaneCore::ConfigItem.new(key: :notes_type,
|
|
255
|
-
env_name: "FL_HOCKEY_NOTES_TYPE",
|
|
256
|
-
description: "Notes type for your :notes, \"0\" = Textile, \"1\" = Markdown (default)",
|
|
257
|
-
default_value: "1"),
|
|
258
|
-
FastlaneCore::ConfigItem.new(key: :release_type,
|
|
259
|
-
env_name: "FL_HOCKEY_RELEASE_TYPE",
|
|
260
|
-
description: "Release type of the app: \"0\" = Beta (default), \"1\" = Store, \"2\" = Alpha, \"3\" = Enterprise",
|
|
261
|
-
default_value: "0"),
|
|
262
|
-
FastlaneCore::ConfigItem.new(key: :mandatory,
|
|
263
|
-
env_name: "FL_HOCKEY_MANDATORY",
|
|
264
|
-
description: "Set to \"1\" to make this update mandatory",
|
|
265
|
-
default_value: "0"),
|
|
266
|
-
FastlaneCore::ConfigItem.new(key: :teams,
|
|
267
|
-
env_name: "FL_HOCKEY_TEAMS",
|
|
268
|
-
description: "Comma separated list of team ID numbers to which this build will be restricted",
|
|
269
|
-
optional: true),
|
|
270
|
-
FastlaneCore::ConfigItem.new(key: :users,
|
|
271
|
-
env_name: "FL_HOCKEY_USERS",
|
|
272
|
-
description: "Comma separated list of user ID numbers to which this build will be restricted",
|
|
273
|
-
optional: true),
|
|
274
|
-
FastlaneCore::ConfigItem.new(key: :tags,
|
|
275
|
-
env_name: "FL_HOCKEY_TAGS",
|
|
276
|
-
description: "Comma separated list of tags which will receive access to the build",
|
|
277
|
-
optional: true),
|
|
278
|
-
FastlaneCore::ConfigItem.new(key: :bundle_short_version,
|
|
279
|
-
env_name: "FL_HOCKEY_BUNDLE_SHORT_VERSION",
|
|
280
|
-
description: "The bundle_short_version of your application, required when using `create_update`",
|
|
281
|
-
optional: true),
|
|
282
|
-
FastlaneCore::ConfigItem.new(key: :bundle_version,
|
|
283
|
-
env_name: "FL_HOCKEY_BUNDLE_VERSION",
|
|
284
|
-
description: "The bundle_version of your application, required when using `create_update`",
|
|
285
|
-
optional: true),
|
|
286
|
-
FastlaneCore::ConfigItem.new(key: :public_identifier,
|
|
287
|
-
env_name: "FL_HOCKEY_PUBLIC_IDENTIFIER",
|
|
288
|
-
description: "App id of the app you are targeting, usually you won't need this value. Required, if `upload_dsym_only` set to `true`",
|
|
289
|
-
optional: true),
|
|
290
|
-
FastlaneCore::ConfigItem.new(key: :commit_sha,
|
|
291
|
-
env_name: "FL_HOCKEY_COMMIT_SHA",
|
|
292
|
-
description: "The Git commit SHA for this build",
|
|
293
|
-
optional: true),
|
|
294
|
-
FastlaneCore::ConfigItem.new(key: :repository_url,
|
|
295
|
-
env_name: "FL_HOCKEY_REPOSITORY_URL",
|
|
296
|
-
description: "The URL of your source repository",
|
|
297
|
-
optional: true),
|
|
298
|
-
FastlaneCore::ConfigItem.new(key: :build_server_url,
|
|
299
|
-
env_name: "FL_HOCKEY_BUILD_SERVER_URL",
|
|
300
|
-
description: "The URL of the build job on your build server",
|
|
301
|
-
optional: true),
|
|
302
|
-
FastlaneCore::ConfigItem.new(key: :upload_dsym_only,
|
|
303
|
-
env_name: "FL_HOCKEY_UPLOAD_DSYM_ONLY",
|
|
304
|
-
description: "Flag to upload only the dSYM file to hockey app",
|
|
305
|
-
type: Boolean,
|
|
306
|
-
default_value: false),
|
|
307
|
-
FastlaneCore::ConfigItem.new(key: :owner_id,
|
|
308
|
-
env_name: "FL_HOCKEY_OWNER_ID",
|
|
309
|
-
description: "ID for the owner of the app",
|
|
310
|
-
optional: true),
|
|
311
|
-
FastlaneCore::ConfigItem.new(key: :strategy,
|
|
312
|
-
env_name: "FL_HOCKEY_STRATEGY",
|
|
313
|
-
description: "Strategy: 'add' = to add the build as a new build even if it has the same build number (default); 'replace' = to replace a build with the same build number",
|
|
314
|
-
default_value: "add",
|
|
315
|
-
verify_block: proc do |value|
|
|
316
|
-
UI.user_error!("Invalid value '#{value}' for key 'strategy'. Allowed values are 'add', 'replace'.") unless ['add', 'replace'].include?(value)
|
|
317
|
-
end),
|
|
318
|
-
FastlaneCore::ConfigItem.new(key: :timeout,
|
|
319
|
-
env_name: "FL_HOCKEY_TIMEOUT",
|
|
320
|
-
description: "Request timeout in seconds",
|
|
321
|
-
type: Integer,
|
|
322
|
-
optional: true),
|
|
323
|
-
FastlaneCore::ConfigItem.new(key: :bypass_cdn,
|
|
324
|
-
env_name: "FL_HOCKEY_BYPASS_CDN",
|
|
325
|
-
description: "Flag to bypass Hockey CDN when it uploads successfully but reports error",
|
|
326
|
-
type: Boolean,
|
|
327
|
-
default_value: false),
|
|
328
|
-
FastlaneCore::ConfigItem.new(key: :dsa_signature,
|
|
329
|
-
env_name: "FL_HOCKEY_DSA_SIGNATURE",
|
|
330
|
-
description: "DSA signature for sparkle updates for macOS",
|
|
331
|
-
default_value: "",
|
|
332
|
-
optional: true)
|
|
333
|
-
]
|
|
334
|
-
end
|
|
335
|
-
|
|
336
|
-
def self.output
|
|
337
|
-
[
|
|
338
|
-
['HOCKEY_DOWNLOAD_LINK', 'The newly generated download link for this build'],
|
|
339
|
-
['HOCKEY_BUILD_INFORMATION', 'contains all keys/values from the HockeyApp API, like :title, :bundle_identifier']
|
|
340
|
-
]
|
|
341
|
-
end
|
|
342
|
-
|
|
343
|
-
def self.author
|
|
344
|
-
["KrauseFx", "modzelewski", "lacostej"]
|
|
345
|
-
end
|
|
346
|
-
|
|
347
|
-
def self.is_supported?(platform)
|
|
348
|
-
true
|
|
349
|
-
end
|
|
350
|
-
|
|
351
|
-
def self.details
|
|
352
|
-
[
|
|
353
|
-
"HockeyApp will be no longer supported and will be transitioned into App Center on November 16, 2019.",
|
|
354
|
-
"Please migrate over to [App Center](https://github.com/Microsoft/fastlane-plugin-appcenter/)",
|
|
355
|
-
"",
|
|
356
|
-
"Symbols will also be uploaded automatically if a `app.dSYM.zip` file is found next to `app.ipa`. In case it is located in a different place you can specify the path explicitly in the `:dsym` parameter.",
|
|
357
|
-
"More information about the available options can be found in the [HockeyApp Docs](http://support.hockeyapp.net/kb/api/api-versions#upload-version)."
|
|
358
|
-
].join("\n")
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
def self.example_code
|
|
362
|
-
[
|
|
363
|
-
'hockey(
|
|
364
|
-
api_token: "...",
|
|
365
|
-
ipa: "./app.ipa",
|
|
366
|
-
notes: "Changelog"
|
|
367
|
-
)',
|
|
368
|
-
'hockey(
|
|
369
|
-
api_token: "...",
|
|
370
|
-
create_update: true,
|
|
371
|
-
public_identifier: "....",
|
|
372
|
-
bundle_short_version: "1.0.2",
|
|
373
|
-
bundle_version: "1.0.2.145",
|
|
374
|
-
ipa: "./my.msi",
|
|
375
|
-
notes: "Changelog"
|
|
376
|
-
)',
|
|
377
|
-
'# You can bypass the CDN if you are uploading to Hockey and receive an SSL error (which can happen on corporate firewalls)
|
|
378
|
-
hockey(
|
|
379
|
-
api_token: "...",
|
|
380
|
-
ipa: "./app.ipa",
|
|
381
|
-
notes: "Changelog",
|
|
382
|
-
bypass_cdn: true
|
|
383
|
-
)'
|
|
384
|
-
]
|
|
385
|
-
end
|
|
386
|
-
|
|
387
|
-
def self.category
|
|
388
|
-
:deprecated
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
def self.deprecated_notes
|
|
392
|
-
[
|
|
393
|
-
"HockeyApp will be no longer supported and will be transitioned into App Center on November 16, 2019.",
|
|
394
|
-
"Please migrate over to [App Center](https://github.com/Microsoft/fastlane-plugin-appcenter/)"
|
|
395
|
-
].join("\n")
|
|
396
|
-
end
|
|
397
|
-
end
|
|
398
|
-
# rubocop:enable Metrics/ClassLength
|
|
399
|
-
end
|
|
400
|
-
end
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
module Fastlane
|
|
2
|
-
module Actions
|
|
3
|
-
class TypetalkAction < Action
|
|
4
|
-
def self.run(params)
|
|
5
|
-
options = {
|
|
6
|
-
message: nil,
|
|
7
|
-
note_path: nil,
|
|
8
|
-
success: true,
|
|
9
|
-
topic_id: nil,
|
|
10
|
-
typetalk_token: nil
|
|
11
|
-
}.merge(params || {})
|
|
12
|
-
|
|
13
|
-
[:message, :topic_id, :typetalk_token].each do |key|
|
|
14
|
-
UI.user_error!("No #{key} given.") unless options[key]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
emoticon = (options[:success] ? ':smile:' : ':rage:')
|
|
18
|
-
message = "#{emoticon} #{options[:message]}"
|
|
19
|
-
|
|
20
|
-
note_path = File.expand_path(options[:note_path]) if options[:note_path]
|
|
21
|
-
if note_path && File.exist?(note_path)
|
|
22
|
-
contents = File.read(note_path)
|
|
23
|
-
message += "\n\n```\n#{contents}\n```"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
topic_id = options[:topic_id]
|
|
27
|
-
typetalk_token = options[:typetalk_token]
|
|
28
|
-
|
|
29
|
-
self.post_to_typetalk(message, topic_id, typetalk_token)
|
|
30
|
-
|
|
31
|
-
UI.success('Successfully sent Typetalk notification')
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def self.post_to_typetalk(message, topic_id, typetalk_token)
|
|
35
|
-
require 'net/http'
|
|
36
|
-
require 'uri'
|
|
37
|
-
|
|
38
|
-
uri = URI.parse("https://typetalk.in/api/v1/topics/#{topic_id}")
|
|
39
|
-
response = Net::HTTP.post_form(uri, { 'message' => message,
|
|
40
|
-
'typetalkToken' => typetalk_token })
|
|
41
|
-
|
|
42
|
-
self.check_response(response)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def self.check_response(response)
|
|
46
|
-
case response.code.to_i
|
|
47
|
-
when 200, 204
|
|
48
|
-
true
|
|
49
|
-
else
|
|
50
|
-
UI.user_error!("Could not sent Typetalk notification")
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def self.description
|
|
55
|
-
"Post a message to [Typetalk](https://www.typetalk.com/)"
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def self.available_options
|
|
59
|
-
[
|
|
60
|
-
['message', 'The message to post'],
|
|
61
|
-
['note_path', 'Path to an additional note'],
|
|
62
|
-
['topic_id', 'Typetalk topic id'],
|
|
63
|
-
['success', 'Successful build?'],
|
|
64
|
-
['typetalk_token', 'typetalk token']
|
|
65
|
-
]
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def self.author
|
|
69
|
-
"Nulab Inc."
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def self.is_supported?(platform)
|
|
73
|
-
true
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def self.example_code
|
|
77
|
-
[
|
|
78
|
-
'typetalk(
|
|
79
|
-
message: "App successfully released!",
|
|
80
|
-
note_path: "ChangeLog.md",
|
|
81
|
-
topicId: 1,
|
|
82
|
-
success: true,
|
|
83
|
-
typetalk_token: "Your Typetalk Token"
|
|
84
|
-
)'
|
|
85
|
-
]
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
def self.category
|
|
89
|
-
:notifications
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
end
|