mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-22 08:10:40 +00:00
make version a function, not class
This commit is contained in:
@@ -19,3 +19,11 @@ fun Project.gitClone(name: String) {
|
||||
standardOutput = stdout
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.version(major: String, minor: String, revision: String, preRelease: Boolean = false): String {
|
||||
return if (!preRelease)
|
||||
"$major.$minor.$revision"
|
||||
else //Only use git hash if it's a prerelease.
|
||||
"$major.$minor.$revision-BETA+${getGitHash()}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user