This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-release-tools.git
The following commit(s) were added to refs/heads/master by this push:
new 828284c TOMEE-3921 - Consistency for sha512 hashes in releases
828284c is described below
commit 828284c64d41dcb9c35fdc6c15a959133ad0b783
Author: Richard Zowalla <[email protected]>
AuthorDate: Sat Apr 23 11:15:06 2022 +0200
TOMEE-3921 - Consistency for sha512 hashes in releases
---
.../java/org/apache/openejb/tools/release/cmd/Dist.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/openejb/tools/release/cmd/Dist.java
b/src/main/java/org/apache/openejb/tools/release/cmd/Dist.java
index 5e095c3..61e95f5 100644
--- a/src/main/java/org/apache/openejb/tools/release/cmd/Dist.java
+++ b/src/main/java/org/apache/openejb/tools/release/cmd/Dist.java
@@ -337,13 +337,13 @@ public class Dist {
}
default void createSha256() {
- final String sha256 = hash("SHA-256");
+ final String sha256 = hash("SHA-256") + getTabbedFilename();
write(sha256, sha256());
}
default void createSha512() {
- final String sha256 = hash("SHA-512");
- write(sha256, sha512());
+ final String sha512 = hash("SHA-512") + getTabbedFilename();
+ write(sha512, sha512());
}
default File asc() {
@@ -362,6 +362,14 @@ public class Dist {
return get(get(), "sha512");
}
+ default String getTabbedFilename() {
+ return "\t" + getFileName();
+ }
+
+ default String getFileName() {
+ return get().getName();
+ }
+
static void write(String content, File file) {
try {
IO.copy(IO.read(content), file);