From cb575bd620d3f32315de3ae47f7249a40e46ec89 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 8 Feb 2021 19:00:18 +0000 Subject: [PATCH] JAL-3521 Adding a build_properties into sourceDist tarball, with INSTALLATION=SourceDist git-commit... --- build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle b/build.gradle index b2e9af1..3bf1649 100644 --- a/build.gradle +++ b/build.gradle @@ -1704,6 +1704,7 @@ task installers(type: com.install4j.gradle.Install4jTask) { task sourceDist(type: Tar) { + dependsOn createBuildProperties def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_") def outputFileName = "${project.name}_${VERSION_UNDERSCORES}.tar.gz" @@ -1795,6 +1796,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