Sha256: 2b34b94c9537010e9cdb0cb5728ee2ea929f690259cefe47d3546e66483a6c0f
Contents?: true
Size: 1.14 KB
Versions: 14
Compression:
Stored size: 1.14 KB
Contents
module Fastlane module Actions module SharedValues end class GitBranchAction < Action def self.run(params) return ENV['GIT_BRANCH'] if FastlaneCore::Env.truthy?('GIT_BRANCH') return ENV["TRAVIS_BRANCH"] if FastlaneCore::Env.truthy?("TRAVIS_BRANCH") return ENV["BITRISE_GIT_BRANCH"] if FastlaneCore::Env.truthy?("BITRISE_GIT_BRANCH") `git symbolic-ref HEAD --short 2>/dev/null`.strip end ##################################################### # @!group Documentation ##################################################### def self.description "Returns the name of the current git branch" end def self.details "If no branch could be found, this action will return nil" end def self.available_options [] end def self.output [] end def self.authors ["KrauseFx"] end def self.is_supported?(platform) true end def self.example_code [ 'git_branch' ] end def self.category :source_control end end end end
Version data entries
14 entries across 14 versions & 1 rubygems