Class: Fastlane::Helper::CodepushLoginHelper
- Inherits:
-
Object
- Object
- Fastlane::Helper::CodepushLoginHelper
- Defined in:
- lib/fastlane/plugin/codepush/helper/codepush_login_helper.rb
Class Method Summary collapse
Class Method Details
.is_logged_in ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fastlane/plugin/codepush/helper/codepush_login_helper.rb', line 25 def self.is_logged_in logged_in = true begin Action.sh( "appcenter profile list", print_command: false ) UI.("User is already logged in") rescue logged_in = false UI.("User is not logged in") end logged_in end |
.login(login_token) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fastlane/plugin/codepush/helper/codepush_login_helper.rb', line 8 def self.login(login_token) Action.sh( "appcenter login --token #{login_token}", print_command: false ) UI.("🎉Logged in successfully") rescue StandardError UI.user_error!( "Something went wrong during App Center login!! Please ensure login token #{login_token} is correct" ) end |
.logout ⇒ Object
20 21 22 23 |
# File 'lib/fastlane/plugin/codepush/helper/codepush_login_helper.rb', line 20 def self.logout Action.sh("appcenter logout") UI.("✅Logged out successfully") end |