Print error on missing git setup

This commit is contained in:
Johann Bernhardt committed 2021-11-29 13:59:57 +01:00
1 parent 014fe00ea7
commit 735b91692d
1 file changed
+6 -1
+6 -1
View File
@@ -153,7 +153,12 @@ configurations.all {
// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
'git config core.fileMode false'.execute()
// Pulls version from git tag
version = minecraftVersion + "-" + gitVersion()
try {
version = minecraftVersion + "-" + gitVersion()
}
catch (Exception e) {
throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag!");
}
group = modGroup
archivesBaseName = modId