aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2023-05-27 00:35:12 -0600
committerBryson Steck <brysonsteck@protonmail.com>2023-05-27 00:35:12 -0600
commitd1bf5734bf86ef81e11414f30a03670660838998 (patch)
treebbba3d28727bcb8c79fe01fd2078960b3d1eb41f /build.gradle
parent88802ece0407cbf83ab5dbe50fe694ebfe98f2f3 (diff)
downloadServerCraft-d1bf5734bf86ef81e11414f30a03670660838998.tar
ServerCraft-d1bf5734bf86ef81e11414f30a03670660838998.tar.gz
ServerCraft-d1bf5734bf86ef81e11414f30a03670660838998.tar.bz2
version based on tags and fix eula text0.1-beta
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle
index c660a31..28d0928 100644
--- a/build.gradle
+++ b/build.gradle
@@ -115,7 +115,11 @@ task createProperties(dependsOn: processResources) {
def stdout = new ByteArrayOutputStream()
if (project.hasProperty("release")) {
- project.version = 1.0
+ exec {
+ commandLine "git", "describe", "--tags", "--abbrev=0"
+ standardOutput = stdout
+ }
+ project.version = stdout.toString().trim().replaceAll("\"", "")
} else {
exec {
commandLine "git", "log", "-n", "1", "--pretty=format:\"%h\""