Skip to content

Commit c5c5abf

Browse files
committed
Updated to new system
1 parent 2dc82b0 commit c5c5abf

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

build.gradle

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.mangorage.mangobotgradle.util.GitVersion
2+
13
buildscript {
24
repositories {
35
mavenLocal()
@@ -15,7 +17,7 @@ buildscript {
1517

1618
dependencies {
1719
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
18-
classpath 'org.mangorage:MangoBotGradle:5.0.2'
20+
classpath 'org.mangorage:MangoBotGradle:5.0.4'
1921
}
2022
}
2123

@@ -25,26 +27,7 @@ apply plugin: 'MangoBotGradle'
2527
apply plugin: 'maven-publish'
2628

2729
group = 'org.mangorage'
28-
version = getLatestGitTag() + "." + getLatestGitVersion()
29-
30-
def getLatestGitTag() {
31-
def result = "git describe --long --tags".execute().text.trim()
32-
if (result.empty) {
33-
throw new RuntimeException("Failed to retrieve commit count")
34-
} else {
35-
return result.split("-")[0]
36-
}
37-
}
38-
39-
def getLatestGitVersion() {
40-
def result = "git describe --long --tags".execute().text.trim()
41-
if (result.empty) {
42-
throw new RuntimeException("Failed to retrieve commit count")
43-
} else {
44-
def commitCount = result.split("-")[1].toInteger()
45-
return commitCount;
46-
}
47-
}
30+
version = GitVersion.getGitVersion().getVersionAsString()
4831

4932
println("Version: " + version)
5033

0 commit comments

Comments
 (0)