From: Ben Soares Date: Mon, 8 Feb 2021 19:00:18 +0000 (+0000) Subject: JAL-3521 Adding a build_properties into sourceDist tarball, with INSTALLATION=SourceD... X-Git-Tag: Release_2_11_1_4~9^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cb575bd620d3f32315de3ae47f7249a40e46ec89;p=jalview.git JAL-3521 Adding a build_properties into sourceDist tarball, with INSTALLATION=SourceDist git-commit... --- 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+"]") + }) + } + }