From 20b030b657ab849a61bdd950abba0c58b013f11f Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 8 Feb 2021 19:00:18 +0000 Subject: [PATCH 1/1] JAL-3521 Adding a build_properties into sourceDist tarball, with INSTALLATION=SourceDist git-commit... --- build.gradle | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 469d081..2e23013 100644 --- a/build.gradle +++ b/build.gradle @@ -1970,7 +1970,8 @@ spotless { task sourceDist(type: Tar) { group "distribution" description "Create a source .tar.gz file for distribution" - + + dependsOn createBuildProperties dependsOn convertMdFiles def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_") @@ -2058,6 +2059,15 @@ task sourceDist(type: Tar) { // exclude(EXCLUDE_FILES) // exclude(PROCESS_FILES) // } + + from(file(buildProperties).getParent()) { + include(file(buildProperties).getName()) + rename(file(buildProperties).getName(), "build_properties") + filter({ line -> + line.replaceAll("^INSTALLATION=.*\$","INSTALLATION=SourceDist"+" git-commit\\\\:"+gitHash+" ["+gitBranch+"]") + }) + } + } -- 1.7.10.2