Sha256: b75f99a84f61e0079e3578fda557f0476544f13636d588b2bf01be21cbf33b0b
Contents?: true
Size: 1.88 KB
Versions: 254
Compression:
Stored size: 1.88 KB
Contents
module Fastlane module Actions class GitAddAction < Action 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 add #{paths}") UI.success("Successfully added \"#{params[:path]}\" 💾.") return result end ##################################################### # @!group Documentation ##################################################### def self.description "Directly add the given file" end def self.available_options [ FastlaneCore::ConfigItem.new(key: :path, description: "The file you want to add", is_string: false, verify_block: proc do |value| if value.kind_of?(String) UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value) else value.each do |x| UI.user_error!("Couldn't find file at path '#{x}'") unless File.exist?(x) end end end) ] end def self.return_value nil end def self.authors ["4brunu"] end def self.is_supported?(platform) true end def self.example_code [ 'git_add(path: "./version.txt")', 'git_add(path: ["./version.txt", "./changelog.txt"])' ] end def self.category :source_control end end end end
Version data entries
254 entries across 254 versions & 1 rubygems