mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Rework checksums some more
This commit is contained in:
parent
0070a08109
commit
6c9fddebe6
2 changed files with 9 additions and 9 deletions
|
@ -52,15 +52,6 @@ project.ext {
|
|||
javafxVersion = '21.0.1'
|
||||
}
|
||||
|
||||
def getArtifactChecksumSha256Hex(String name) {
|
||||
var file = layout.buildDirectory.file("dist/checksums/artifacts/${name}.sha256")
|
||||
return file.get().getAsFile().exists() ? file.get().getAsFile().text : "";
|
||||
}
|
||||
|
||||
def getArtifactChecksumSha256Base64(String name) {
|
||||
return Base64.getEncoder().encodeToString(HexFormat.of().parseHex(getArtifactChecksumSha256Hex(name)))
|
||||
}
|
||||
|
||||
def replaceVariablesInFileAsString(String f, Map<String, String> replacements) {
|
||||
def fileName = file(f).getName()
|
||||
def text = file(f).text
|
||||
|
|
9
dist/build.gradle
vendored
9
dist/build.gradle
vendored
|
@ -48,6 +48,15 @@ task createChecksums(type: Checksum) {
|
|||
}
|
||||
}
|
||||
|
||||
def getArtifactChecksumSha256Hex(String name) {
|
||||
var file = layout.buildDirectory.file("dist/checksums/artifacts/${name}.sha256")
|
||||
return file.get().getAsFile().exists() ? file.get().getAsFile().text : "";
|
||||
}
|
||||
|
||||
def getArtifactChecksumSha256Base64(String name) {
|
||||
return Base64.getEncoder().encodeToString(HexFormat.of().parseHex(getArtifactChecksumSha256Hex(name)))
|
||||
}
|
||||
|
||||
clean {
|
||||
doFirst {
|
||||
// Fix clean failing when file is read-only
|
||||
|
|
Loading…
Reference in a new issue