mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
include current git commit hash in about dialog
This commit is contained in:
parent
f30da06aaf
commit
3ec800e5e8
3 changed files with 20 additions and 0 deletions
14
build.gradle
14
build.gradle
|
@ -18,6 +18,15 @@ if(System.getProperty("os.arch") == "aarch64") {
|
||||||
targetName = "-" + osArch
|
targetName = "-" + osArch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def getCommitHash = { ->
|
||||||
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
return stdout.toString().trim()
|
||||||
|
}
|
||||||
|
|
||||||
group "com.sparrowwallet"
|
group "com.sparrowwallet"
|
||||||
version "${sparrowVersion}"
|
version "${sparrowVersion}"
|
||||||
|
|
||||||
|
@ -127,6 +136,11 @@ processResources {
|
||||||
exclude "${osName}/${osArch}/**"
|
exclude "${osName}/${osArch}/**"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
filesMatching('**/about.fxml') {
|
||||||
|
filter { line ->
|
||||||
|
line.replace('<!--COMMIT_HASH-->', "<Label text=\"Commit Hash: ${getCommitHash()}\" styleClass=\"commit-hash\"/>")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|
|
@ -13,3 +13,7 @@
|
||||||
-fx-padding: 10 25 25 25;
|
-fx-padding: 10 25 25 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.commit-hash {
|
||||||
|
-fx-opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
<HBox><Label text="If you find Sparrow useful, consider donating at "/><Hyperlink text="https://sparrowwallet.com/donate" onAction="#openDonate"/></HBox>
|
<HBox><Label text="If you find Sparrow useful, consider donating at "/><Hyperlink text="https://sparrowwallet.com/donate" onAction="#openDonate"/></HBox>
|
||||||
</VBox>
|
</VBox>
|
||||||
<HBox styleClass="button-area" alignment="BOTTOM_RIGHT" VBox.vgrow="SOMETIMES">
|
<HBox styleClass="button-area" alignment="BOTTOM_RIGHT" VBox.vgrow="SOMETIMES">
|
||||||
|
<!--COMMIT_HASH-->
|
||||||
|
<Region HBox.hgrow="ALWAYS" />
|
||||||
<Button text="Close" onAction="#close" />
|
<Button text="Close" onAction="#close" />
|
||||||
</HBox>
|
</HBox>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|
Loading…
Reference in a new issue