From 3ec800e5e8fab2b4ff57c505e9df18140dceab1d Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 21 Jul 2022 14:51:14 +0200 Subject: [PATCH] include current git commit hash in about dialog --- build.gradle | 14 ++++++++++++++ .../resources/com/sparrowwallet/sparrow/about.css | 4 ++++ .../resources/com/sparrowwallet/sparrow/about.fxml | 2 ++ 3 files changed, 20 insertions(+) diff --git a/build.gradle b/build.gradle index 63465f4f..354e51dc 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,15 @@ if(System.getProperty("os.arch") == "aarch64") { targetName = "-" + osArch } +def getCommitHash = { -> + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-parse', '--short', 'HEAD' + standardOutput = stdout + } + return stdout.toString().trim() +} + group "com.sparrowwallet" version "${sparrowVersion}" @@ -127,6 +136,11 @@ processResources { exclude "${osName}/${osArch}/**" } } + filesMatching('**/about.fxml') { + filter { line -> + line.replace('', "