From 959e095069a832bca1ac8739af7502ba54215976 Mon Sep 17 00:00:00 2001 From: Jonatan Ivanov Date: Mon, 16 Oct 2023 16:54:09 -0700 Subject: [PATCH] set version from tag manually --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index ea3f87f95c..367db03e7d 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,12 @@ buildscript { // TODO: remove this hack once jgit supports worktrees and nebula upgrades. if (project.hasProperty('antora')) { 'git fetch --unshallow --all --tags'.execute().text // antora shallow-clones so there is no history + String tag = 'git tag --points-at HEAD'.execute().text.trim() // jgit does not able to figure out tags in antora's setup + if (tag) { ext['release.version'] = tag } ext['git.root'] = 'git rev-parse --path-format=absolute --git-common-dir'.execute().text.trim() + println '------------' + println "${tag}" + println '------------' } // TODO: remove this hack, see: https://github.com/nebula-plugins/nebula-release-plugin/issues/213