Skip to content

Commit 1b63e27

Browse files
committed
Improved the header...
1 parent 6e47332 commit 1b63e27

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

build.gradle

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import org.mangorage.mangobotgradle.util.GitVersion
2+
3+
14
buildscript {
25
repositories {
36
mavenLocal()
@@ -15,7 +18,7 @@ buildscript {
1518

1619
dependencies {
1720
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
18-
classpath 'org.mangorage:MangoBotGradle:5.0.2'
21+
classpath 'org.mangorage:MangoBotGradle:5.0.4'
1922
}
2023
}
2124

@@ -25,26 +28,7 @@ apply plugin: 'MangoBotGradle'
2528
apply plugin: 'maven-publish'
2629

2730
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-
}
31+
version = GitVersion.getGitVersion().getVersionAsString()
4832

4933
println("Version: " + version)
5034

0 commit comments

Comments
 (0)