Class: Fastlane::Actions::DeploygateAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::DeploygateAction
- Defined in:
- lib/fastlane/actions/deploygate.rb
Constant Summary collapse
- DEPLOYGATE_URL_BASE =
'https://deploygate.com'
Class Method Summary collapse
- .author ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .output ⇒ Object
- .run(params) ⇒ Object
Methods inherited from Fastlane::Action
Class Method Details
.author ⇒ Object
108 109 110 |
# File 'lib/fastlane/actions/deploygate.rb', line 108 def self. "tnj" end |
.available_options ⇒ Object
91 92 93 94 95 96 97 98 |
# File 'lib/fastlane/actions/deploygate.rb', line 91 def self. [ ['api_token', 'DeployGate API Token'], ['user', 'Target username or organization name'], ['ipa', 'Path to your IPA file. Defaults to output of xcodebuild and ipa'], ['message', 'Text for the uploaded build'] ] end |
.description ⇒ Object
87 88 89 |
# File 'lib/fastlane/actions/deploygate.rb', line 87 def self.description "Upload a new build to DeployGate" end |
.output ⇒ Object
100 101 102 103 104 105 106 |
# File 'lib/fastlane/actions/deploygate.rb', line 100 def self.output [ ['DEPLOYGATE_URL', 'URL of the newly uploaded build'], ['DEPLOYGATE_REVISION', 'auto incremented revision number'], ['DEPLOYGATE_APP_INFO', 'Contains app revision, bundle identifier, etc.'] ] end |
.run(params) ⇒ Object
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' # Available options: https://deploygate.com/docs/api = { ipa: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] }.merge(params.first || {}) () Helper.log.info 'Starting with ipa upload to DeployGate... this could take some time ⏳'.green client = Shenzhen::Plugins::DeployGate::Client.new( .delete(:api_token), .delete(:user) ) return if Helper.test? response = client.upload_build(.delete(:ipa), ) 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 |