This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 0629c6f Don't create hash for .asc files
0629c6f is described below
commit 0629c6f53d8744c69fc7e636e91db627031736a1
Author: Sebb <[email protected]>
AuthorDate: Sat Aug 1 11:50:31 2020 +0100
Don't create hash for .asc files
---
src/changes/changes.xml | 3 ++-
.../release/plugin/mojos/CommonsDistributionDetachmentMojo.java | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3742684..bfd1269 100755
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -25,7 +25,8 @@
</properties>
<body>
- <release version="1.8" date="2020-MM-DD" description="Version 1.89">
+ <release version="1.8" date="2020-MM-DD" description="Version 1.8">
+ <action type="update" dev="sebb">Don't create hash for .asc
files.</action>
<action type="update" dev="ggregory">Replace FindBugs with
SpotBugs.</action>
<action type="update" dev="ggregory">Update Apache Commons Codec from
1.13 to 1.14.</action>
<action type="update" dev="ggregory">Update JUnit from 4.12 to
4.13.</action>
diff --git
a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
index 6796bf8..265bf5a 100755
---
a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
+++
b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
@@ -152,8 +152,10 @@ public class CommonsDistributionDetachmentMojo extends
AbstractMojo {
private void putAttachedArtifactInSha512Map(final Artifact artifact)
throws MojoExecutionException {
try {
final String artifactKey = getArtifactKey(artifact);
- try (FileInputStream fis = new
FileInputStream(artifact.getFile())) {
- artifactSha512s.put(artifactKey, DigestUtils.sha512Hex(fis));
+ if (!artifactKey.endsWith(".asc")) { // .asc files don't need
hashes
+ try (FileInputStream fis = new
FileInputStream(artifact.getFile())) {
+ artifactSha512s.put(artifactKey,
DigestUtils.sha512Hex(fis));
+ }
}
} catch (final IOException e) {
throw new MojoExecutionException(