Class: Fastlane::Actions::BrewAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::BrewAction
- Defined in:
- lib/fastlane/plugin/brew/actions/brew_action.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
42 43 44 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 42 def self. ["Michael Ruhl"] end |
.available_options ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 27 def self. [ FastlaneCore::ConfigItem.new(key: :command, description: "Brew command to be executed", optional: false, is_string: true) ] end |
.description ⇒ Object
19 20 21 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 19 def self.description "Run Homebrew/Linuxbrew command" end |
.details ⇒ Object
23 24 25 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 23 def self.details 'Example: brew("install imagemagick")' end |
.example_code ⇒ Object
36 37 38 39 40 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 36 def self.example_code [ 'brew("install imagemagick")' ] end |
.is_supported?(platform) ⇒ Boolean
46 47 48 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 46 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/fastlane/plugin/brew/actions/brew_action.rb', line 4 def self.run(params) Actions.sh("which brew", log: false, error_callback: proc do |error_output| UI.user_error!("Homebrew/Linuxbrew is not installed") end) UI.command("brew #{params[:command]}") FastlaneCore::CommandExecutor.execute(command: 'env -i HOME="$HOME" TERM="$TERM" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" brew ' + params[:command], print_all: true, print_command: false) end |