Sha256: 181e9d3edf51a5c3dd81e28400492f32e87a9d36483981f6d1f9379fc4603044

Contents?: true

Size: 1.71 KB

Versions: 341

Compression:

Stored size: 1.71 KB

Contents

module Fastlane
  module Actions
    class GitCommitAction < 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 commit -m #{params[:message].shellescape} #{paths}")
        UI.success("Successfully committed \"#{params[:path]}\" 💾.")
        return result
      end

      #####################################################
      # @!group Documentation
      #####################################################

      def self.description
        "Directly commit the given file with the given message"
      end

      def self.details
        ""
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :path,
                                       description: "The file you want to commit",
                                       is_string: false),
          FastlaneCore::ConfigItem.new(key: :message,
                                       description: "The commit message that should be used")
        ]
      end

      def self.output
      end

      def self.return_value
        nil
      end

      def self.authors
        ["KrauseFx"]
      end

      def self.is_supported?(platform)
        true
      end

      def self.example_code
        [
          'git_commit(path: "./version.txt", message: "Version Bump")',
          'git_commit(path: ["./version.txt", "./changelog.txt"], message: "Version Bump")',
          'git_commit(path: ["./*.txt", "./*.md"], message: "Update documentation")'
        ]
      end

      def self.category
        :source_control
      end
    end
  end
end

Version data entries

341 entries across 341 versions & 1 rubygems

Version Path
fastlane-2.94.0.beta.20180425050017 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.1 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.94.0.beta.20180424050050 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180423050019 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180422050034 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180421050012 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180420050021 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180419050008 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180418050020 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.92.1 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.93.0.beta.20180417050013 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.92.0 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.92.0.beta.20180416050023 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.92.0.beta.20180415050019 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.92.0.beta.20180414050023 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.91.0 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.91.0.beta.20180413050017 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.90.0 fastlane/lib/fastlane/actions/git_commit.rb
fastlane-2.90.0.beta.20180412050111 fastlane/lib/fastlane/actions/git_commit.rb