Skip to content

Commit

Permalink
set version from tag manually
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov committed Oct 16, 2023
1 parent c85e1c7 commit 2b5d441
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ buildscript {
// Unfortunately jgit does not support worktrees: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477475
// 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
'git fetch --unshallow --all --tags'.execute() // 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
Expand Down

0 comments on commit 2b5d441

Please sign in to comment.