gradle-GitVersioner
gradle-GitVersioner copied to clipboard
Allow consumers to determine stable branches at build time using regex
Adds a call to a new configuration closure named isStableBranch
to allow consumers of the script to determine if a branch is stable when running a build. This is helpful for stable branches that may be dynamic in some way and need to be checked via regex. An example would be release branches, something like release-v4.5
.
Ex. implementation:
ext.gitVersioner = [
isStableBranch: { branch ->
switch(branch) {
case 'master': return true
case ~/release-[\w\W]*/: return true
default: return false
}
}
]