You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2021/10/06 12:10:29 UTC

[lucene] branch main updated: LUCENE-10152 Fix sha512 file syntax (#356)

This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new b20ffa5  LUCENE-10152 Fix sha512 file syntax (#356)
b20ffa5 is described below

commit b20ffa5b2befb677f8474569cfdb8f31e2f90d43
Author: Jan Høydahl <ja...@users.noreply.github.com>
AuthorDate: Wed Oct 6 14:10:26 2021 +0200

    LUCENE-10152 Fix sha512 file syntax (#356)
---
 gradle/publishing/distribution.gradle | 3 ++-
 lucene/packaging/build.gradle         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gradle/publishing/distribution.gradle b/gradle/publishing/distribution.gradle
index 9483747..407ead4 100644
--- a/gradle/publishing/distribution.gradle
+++ b/gradle/publishing/distribution.gradle
@@ -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")
             }
         }
 
diff --git a/lucene/packaging/build.gradle b/lucene/packaging/build.gradle
index 343bfae..1a701d4 100644
--- a/lucene/packaging/build.gradle
+++ b/lucene/packaging/build.gradle
@@ -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 {