class Fastlane::Actions::GitBranchAction

Public Class Methods

authors() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 32
def self.authors
  ["KrauseFx"]
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 22
def self.available_options
  []
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 50
def self.category
  :source_control
end
description() click to toggle source

@!group Documentation

# File fastlane/lib/fastlane/actions/git_branch.rb, line 14
def self.description
  "Returns the name of the current git branch, possibly as managed by CI ENV vars"
end
details() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 18
def self.details
  "If no branch could be found, this action will return an empty string. This is a wrapper for the internal action Actions.git_branch"
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 40
def self.example_code
  [
    'git_branch'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 36
def self.is_supported?(platform)
  true
end
output() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 26
def self.output
  [
    ['GIT_BRANCH_ENV_VARS', 'The git branch environment variables']
  ]
end
return_type() click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 46
def self.return_type
  :string
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/git_branch.rb, line 4
def self.run(params)
  branch = Actions.git_branch || ""
  return "" if branch == "HEAD" # Backwards compatibility with the original (and documented) implementation
  branch
end