File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import org.mangorage.mangobotgradle.util.GitVersion
2+
13buildscript {
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'
2527apply plugin : ' maven-publish'
2628
2729group = ' 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
4932println (" Version: " + version)
5033
You can’t perform that action at this time.
0 commit comments