16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/fastlane/actions/deploygate.rb', line 16
def self.run(params)
require 'shenzhen'
require 'shenzhen/plugins/deploygate'
options = {
ipa: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
}.merge(params.first || {})
assert_options!(options)
Helper.log.info 'Starting with ipa upload to DeployGate... this could take some time ⏳'.green
client = Shenzhen::Plugins::DeployGate::Client.new(
options.delete(:api_token),
options.delete(:user)
)
return if Helper.test?
response = client.upload_build(options.delete(:ipa), options)
if parse_response(response)
Helper.log.info "DeployGate URL: #{Actions.lane_context[SharedValues::DEPLOYGATE_URL]}"
Helper.log.info "Build successfully uploaded to DeployGate as revision \##{Actions.lane_context[SharedValues::DEPLOYGATE_REVISION]}!".green
else
raise 'Error when trying to upload ipa to DeployGate'.red
end
end
|