Even more with kobalt.

This commit is contained in:
Erik C. Thauvin 2016-07-06 21:23:12 -07:00
parent e5e6d9c383
commit eb10f83cf2
2 changed files with 1 additions and 25 deletions

View file

@ -38,25 +38,7 @@ val p = project {
prerelease.insert(0, "+"); prerelease.insert(0, "+");
} }
val value = p.getProperty(patchKey, "0"); return (p.getProperty(majorKey, "1") + "." + p.getProperty(minorKey, "0") + "." + p.getProperty(patchKey, "0") + prerelease + metadata)
val patch: String?
if (isIncrement) {
patch = try {
(value.toInt() + 1).toString();
} catch (e: NumberFormatException) {
"0"
}
FileOutputStream(propsFile).use { output ->
p.setProperty(patchKey, patch)
p.store(output, "")
}
} else {
patch = value;
}
return (p.getProperty(majorKey, "1") + "." + p.getProperty(minorKey, "0") + "." + patch + prerelease + metadata)
} }
version = getVersion() version = getVersion()
@ -93,9 +75,3 @@ val p = project {
mainClass = mainClassName mainClass = mainClassName
} }
} }
@Task(name = "release", dependsOn = arrayOf("clean"), description = "Releases new version.")
fun taskRelease(project: Project): TaskResult {
project.version = project.getVersion(true)
return TaskResult()
}

Binary file not shown.