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_2_0~76 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=20b030b657ab849a61bdd950abba0c58b013f11f JAL-3521 Adding a build_properties into sourceDist tarball, with INSTALLATION=SourceDist git-commit... --- 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+"]") + }) + } + }