LUCENE-10152 Fix sha512 file syntax (#356)

This commit is contained in:
Jan Høydahl 2021-10-06 14:10:26 +02:00 committed by GitHub
parent feac4cd09e
commit b20ffa5b2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -22,7 +22,8 @@ allprojects {
def checksum = {
outputs.files.each { File file ->
String sha512 = new DigestUtils(DigestUtils.sha512Digest).digestAsHex(file).trim()
new File(file.parent, file.name + ".sha512").write(sha512 + " " + file.name, "UTF-8")
// The asterisk signals a binary file, see https://www.gnu.org/software/coreutils/manual/coreutils.html#md5sum-invocation
new File(file.parent, file.name + ".sha512").write(sha512 + " *" + file.name, "UTF-8")
}
}

View File

@ -191,7 +191,8 @@ task assembleSourceDist() {
// TODO: This is copied from distribution.gradle - reuse?
def checksum = { file ->
String sha512 = new DigestUtils(DigestUtils.sha512Digest).digestAsHex(file).trim()
new File(file.parent, file.name + ".sha512").write(sha512 + " " + file.name, "UTF-8")
// The asterisk signals a binary file, see https://www.gnu.org/software/coreutils/manual/coreutils.html#md5sum-invocation
new File(file.parent, file.name + ".sha512").write(sha512 + " *" + file.name, "UTF-8")
}
doFirst {