Class: Fastlane::Actions::FivCleanInstallAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::FivCleanInstallAction
- Defined in:
- lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
88 89 90 91 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 88 def self. # So no one will ever forget your contribution to fastlane :) You are awesome btw! ["Your GitHub/Twitter Name"] end |
.available_options ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 41 def self. # Define all options your action supports. # Below a few examples [ FastlaneCore::ConfigItem.new( key: :platform, env_name: "CORDOVA_PLATFORM", description: "Platform to build on. Can be android, ios or browser", is_string: true, default_value: '', verify_block: proc do |value| UI.user_error!("Platform should be either android, ios or browser") unless ['', 'android', 'ios', 'browser'].include? value end ), FastlaneCore::ConfigItem.new( key: :plugins, env_name: "REFRESH_PLUGINS", description: "also refresh plugins", default_value: false, is_string: false ), FastlaneCore::ConfigItem.new( key: :package_manager, env_name: "PACKAGE_MANAGER", description: "What package manager to use to install dependencies: e.g. yarn | npm", is_string: true, default_value: 'npm', verify_block: proc do |value| UI.user_error!("Platform should be either android, ios or browser") unless ['', 'yarn', 'npm'].include? value end ), ] end |
.description ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 31 def self.description "A short description with <= 80 characters of what this action does" end |
.details ⇒ Object
35 36 37 38 39 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 35 def self.details # Optional: # this is your chance to provide a more detailed description of this action "You can use this action to do cool things..." end |
.is_supported?(platform) ⇒ Boolean
93 94 95 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 93 def self.is_supported?(platform) platform == :android end |
.output ⇒ Object
76 77 78 79 80 81 82 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 76 def self.output # Define the shared values you are going to provide # Example [ ['FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE', 'A description of what this value contains'] ] end |
.return_value ⇒ Object
84 85 86 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 84 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_clean_install.rb', line 8 def self.run(params) if params[:platform].to_s == 'ios' || params[:platform].to_s == 'android' sh "rm -rf node_modules platforms/#{params[:platform]}" elsif params[:platform].to_s == 'browser' sh "rm -rf node_modules www" end if params[:plugins] sh "rm -rf plugins" end sh "#{params[:package_manager]} install" if params[:platform].to_s == 'ios' || params[:platform].to_s == 'android' sh "ionic cordova platform add #{params[:platform]}" end end |