Fix building when not in a git repo (zip download). Closes

This commit is contained in:
modmuss50 2019-05-13 10:20:47 +01:00
parent 9232ac87a2
commit 12a48eade6

View file

@ -16,6 +16,9 @@ def mcVersion = "1.14.1 Pre-Release 2"
def yarnVersion = "+build.2"
def getSubprojectVersion(project, version) {
if (grgit == null) {
return version + "+nogit"
}
def latestCommits = grgit.log(paths: [project.name], maxCommits: 1)
if (latestCommits.isEmpty()) {
return version + "+uncommited"