From badcf001625d70bb93cab296ecccfb9ca22db809 Mon Sep 17 00:00:00 2001 From: Jonatan Ivanov Date: Mon, 16 Oct 2023 17:52:02 -0700 Subject: [PATCH] set version from tag manually --- build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.gradle b/build.gradle index ea3f87f95c..71c160d20b 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,13 @@ 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.substring(1) } ext['git.root'] = 'git rev-parse --path-format=absolute --git-common-dir'.execute().text.trim() + println '------------' + println "${tag}" + println 'should be GA' + println '------------' } // TODO: remove this hack, see: https://github.com/nebula-plugins/nebula-release-plugin/issues/213