Updated build to detect that 'dirty' and 'non-master' branches are not releases

master
B.J. Dweck 2020-09-02 12:11:37 +02:00
parent 78c03988ea
commit 8e5fe74f5c
1 changed files with 8 additions and 3 deletions

View File

@ -17,15 +17,20 @@ repositories {
sourceCompatibility = 1.8
targetCompatibility = 1.8
def isRelease = versionDetails().commitDistance == 0
group 'io.rudefox'
version isRelease ? gitVersion.call() : gitVersion.call() + "-SNAPSHOT"
application {
mainClassName = 'io.rudefox.burrow.RudefoxBurrow'
}
def isRelease = versionDetails().commitDistance == 0 &&
versionDetails().isCleanTag &&
versionDetails().branchName == 'master'
version isRelease ? gitVersion.call() : gitVersion.call() + "-${versionDetails().branchName}-SNAPSHOT"
println "${group}:${project.name}:${version}" + ' ' + (isRelease ? '(RELEASE)' : '(SNAPSHOT)')
run {
standardInput = System.in
}