mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-25 13:30:10 +00:00
make version a function, not class
This commit is contained in:
1 parent
05911027bd
commit
0940611b89
2 files changed
+10
-16
No files matched your search
@@ -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