From 735b91692db6d50f54051acdcabf5f1708f4dbc2 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Mon, 29 Nov 2021 13:59:57 +0100 Subject: [PATCH] Print error on missing git setup --- build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5cb03cc..0d6d6bf 100644 --- a/build.gradle +++ b/build.gradle @@ -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