class Fastlane::Actions::GitCommitLzxAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 27
def self.authors
  ["zhenxingliu"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 40
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :all,description: "all"),
    FastlaneCore::ConfigItem.new(key: :path,
                                 description: "The file you want to commit",
                                 is_string: true),
    FastlaneCore::ConfigItem.new(key: :message,
                                 description: "The commit message that should be used")
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 23
def self.description
  "git commit all add change to git"
end
details() click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 35
def self.details
  # Optional:
  "git commit all add change to git"
end
example_code() click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 51
def self.example_code
  [
    'git_commit(all:true , path: ["*"], message: "Version Bump")',
    '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
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 60
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 31
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/git_commit_lzx/actions/git_commit_lzx_action.rb, line 7
def self.run(params)
  if params[:path].kind_of?(String)
    paths = params[:path].shellescape
  else
    paths = params[:path].map(&:shellescape).join(' ')
  end
  UI.message("The git_commit_lzx plugin is working!")
  if params[:all]
    result = Actions.sh("git commit -a -m #{params[:message].shellescape}")
  else
    result = Actions.sh("git commit -m #{params[:message].shellescape} #{paths}")
  end
  UI.success("Successfully committed \"💾.")
  return result
end