Class: Fastlane::Actions::FetchVersionCodeAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::FetchVersionCodeAction
- Defined in:
- lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb', line 25 def self. ['AdrieanKhisbe', 'VincentCATILLON'] end |
.available_options ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb', line 33 def self. [ FastlaneCore::ConfigItem.new(key: :endpoint, description: 'Version Api endpoint', is_string: true, default_value: ''), FastlaneCore::ConfigItem.new(key: :host, description: 'The host hosting the version API', default_value: ''), FastlaneCore::ConfigItem.new(key: :path, description: 'The path of the version API', default_value: ''), FastlaneCore::ConfigItem.new(key: :method, description: 'The method of the endpoint', is_string: false, default_value: :get), FastlaneCore::ConfigItem.new(key: :secret_header, default_value: ''), FastlaneCore::ConfigItem.new(key: :secret_value, default_value: '') ] end |
.description ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb', line 21 def self.description 'Fetch (and increment) version code for given platform' end |
.is_supported?(platform) ⇒ Boolean
44 45 46 |
# File 'lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb', line 44 def self.is_supported?(platform) [:ios, :android].include?(platform) end |
.return_value ⇒ Object
29 30 31 |
# File 'lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb', line 29 def self.return_value 'Version code of given platform' end |
.run(params) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fastlane/plugin/fetch_version_code/actions/fetch_version_code_action.rb', line 9 def self.run(params) unless params[:host] && params[:path] || params[:endpoint] UI.user_error!('Need either :host and :path or :endpoint arguments') end UI.("About to fetch a version code") version_code = Helper::FetchVersionCodeHelper.fetch_version_code(params) UI.success("Got 'version code': #{version_code}") return version_code end |