Sha256: 77eadea4c12368b4d51d74c03325c524779d945e4001ee3cc9385976b5e7571d
Contents?: true
Size: 1.21 KB
Versions: 13
Compression:
Stored size: 1.21 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['BRANCH_NAME'] if FastlaneCore::Env.truthy?('BRANCH_NAME') 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
13 entries across 13 versions & 1 rubygems