diff --git a/.github/workflows/gradle_build.yml b/.github/workflows/gradle_build.yml index 08e9ab1d3..9d4ed379b 100644 --- a/.github/workflows/gradle_build.yml +++ b/.github/workflows/gradle_build.yml @@ -28,7 +28,7 @@ jobs: run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build -Pmod_version="$(git describe --always --tags | cut -c2-)" + run: ./gradlew build -Pmod_version="$(git describe --always --tags --first-parent | cut -c2-)" - name: Archive Artifacts uses: actions/upload-artifact@v3 diff --git a/build.gradle b/build.gradle index 9371211b0..b8cc58196 100755 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ allprojects { apply plugin: "maven-publish" archivesBaseName = rootProject.archives_base_name - def vers = 'git describe --always --tags --dirty'.execute().text.trim() + def vers = 'git describe --always --tags --first-parent --dirty'.execute().text.trim() if (!vers.startsWith("v")) { println "git doesn't appear to be installed!" println "using version number: " + rootProject.mod_version