Skip to content

Commit 4015743

Browse files
committed
nightly pls
1 parent 2881356 commit 4015743

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,21 @@ plugins {
1818

1919
apply plugin: "net.minecraftforge.gradle"
2020

21-
def semver = 'git describe --tags --match v*'.execute().text.trim().split('-')[0]
2221
def gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
22+
def semver = { ->
23+
try {
24+
def code = new ByteArrayOutputStream()
25+
exec {
26+
commandLine 'git', 'describe', '--tags', '--match', 'v*'
27+
standardOutput = code
28+
}
29+
30+
return Integer.parseInt(code.toString().trim().substring(1).split('-')[0])
31+
}
32+
catch (ignored) {
33+
return "4.0.0";
34+
}
35+
}
2336

2437
def buildNumber = { ->
2538
try {

0 commit comments

Comments
 (0)