Class: Fastlane::Actions::GitStatusAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::GitStatusAction
- Defined in:
- lib/fastlane/plugin/git_status/actions/git_status_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
22 23 24 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 22 def self. ["4brunu"] end |
.available_options ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 34 def self. [ FastlaneCore::ConfigItem.new(key: :path, description: "The file or directory you want to see the status", optional: true, default_value: '.', is_string: false, verify_block: proc do |value| if value.kind_of?(String) paths = value.shellescape UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(paths) elsif value.kind_of?(Array) value.each do |x| UI.user_error!("Couldn't find file at path '#{x}'") unless File.exist?(x) end else UI.user_error!("Wrong param type path '#{value}'") end end), ] end |
.description ⇒ Object
18 19 20 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 18 def self.description "Show the status of one or multiple files/directories" end |
.details ⇒ Object
30 31 32 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 30 def self.details "Show the status of one or multiple files/directories" end |
.is_supported?(platform) ⇒ Boolean
56 57 58 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 56 def self.is_supported?(platform) true end |
.return_value ⇒ Object
26 27 28 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 26 def self.return_value "The output string of the git status command" end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fastlane/plugin/git_status/actions/git_status_action.rb', line 4 def self.run(params) if params[:path].kind_of?(String) paths = params[:path].shellescape else paths = params[:path].map(&:shellescape).join(' ') end result = Actions.sh("git status --porcelain #{paths}") UI.success("git status --porcelain #{paths} \n #{result}") return result end |