gradle-GitVersioner icon indicating copy to clipboard operation
gradle-GitVersioner copied to clipboard

Allow consumers to determine stable branches at build time using regex

Open atljeremy opened this issue 6 years ago • 0 comments

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
    }
  }
]

atljeremy avatar Mar 13 '18 12:03 atljeremy