Documentation
¶
Overview ¶
Package branching implements logic to detect SCM branch, either via launching SCM tool or via environment variables (mostly for CI/CD systems)
Index ¶
Constants ¶
View Source
const ( EnvVariableBamboo = "planRepository_branchDisplayName" EnvVariableJenkins = "GIT_BRANCH" )
Variables ¶
View Source
var AllowFallbackDetection = true
AllowFallbackDetection Is fallback on detection methods allowed, or we do only one?
View Source
var (
CommandRunner = TCommandRunner{&external.TCommand{}}
)
Functions ¶
func GetBranchName ¶
func GetBranchName(c *typeconfig.TypeConfig) (string, error)
GetBranchName Returns the branch name, based on the mechanisms defined in the configuration
func GetDetectionOrder ¶
func GetDetectionOrder() uniquestringlist.UniqueStringList
GetDetectionOrder Retrieve detection order as a list of strings
func GetYearWeek ¶
func GetYearWeek(c *typeconfig.TypeConfig) string
func SetDetectionOrder ¶
SetDetectionOrder Set detection order from the list of strings
Types ¶
type TCommandLine ¶
func CommandGit ¶
func CommandGit() TCommandLine
type TCommandRunner ¶
Click to show internal directories.
Click to hide internal directories.