Updated build to detect that 'dirty' and 'non-master' branches are not releases
This commit is contained in:
parent
78c03988ea
commit
8e5fe74f5c
11
build.gradle
11
build.gradle
|
@ -17,15 +17,20 @@ repositories {
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
def isRelease = versionDetails().commitDistance == 0
|
|
||||||
|
|
||||||
group 'io.rudefox'
|
group 'io.rudefox'
|
||||||
version isRelease ? gitVersion.call() : gitVersion.call() + "-SNAPSHOT"
|
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClassName = 'io.rudefox.burrow.RudefoxBurrow'
|
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 {
|
run {
|
||||||
standardInput = System.in
|
standardInput = System.in
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user