Class: Fastlane::Actions::CodepushLoginAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::CodepushLoginAction
- Defined in:
- lib/fastlane/plugin/codepush/actions/codepush_login_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
26 27 28 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 26 def self. ['Pranit Harekar'] end |
.available_options ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 37 def self. [ FastlaneCore::ConfigItem.new( key: :login_token, env_name: 'APP_CENTER_LOGIN_TOKEN', description: "App center login token to access CodePush service, optional if ENV['APP_CENTER_LOGIN_TOKEN'] is set", optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :enforce, type: TrueClass, optional: true, default_value: false, description: "Enforce logout before login" ) ] end |
.description ⇒ Object
22 23 24 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 22 def self.description 'CodePush login action' end |
.details ⇒ Object
33 34 35 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 33 def self.details 'Log in to App Center to access CodePush service. You can pass token via login_token param or set APP_CENTER_LOGIN_TOKEN environment variable. If none were passed your action will be blocked with UI prompt.' end |
.is_supported?(platform) ⇒ Boolean
56 57 58 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 56 def self.is_supported?(platform) true end |
.return_value ⇒ Object
30 31 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 30 def self.return_value end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fastlane/plugin/codepush/actions/codepush_login_action.rb', line 7 def self.run(params) if params[:enforce] == true Helper::CodepushLoginHelper.logout end unless Helper::CodepushLoginHelper.is_logged_in if params[:login_token].instance_of?(String) Helper::CodepushLoginHelper.login(params[:login_token]) else UI.user_error!('đŸ’¥Missing login_token param') UI.('Note: You can either pass login_token or set APP_CENTER_LOGIN_TOKEN environment variable') end end end |