Skip to content

Commit

Permalink
Fix sha256 hashes being set to literal "SHA-256" in build-info json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sll552 authored Nov 10, 2022
1 parent 9bd00bd commit 789f3e7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ private GradleDeployDetails getIvyDescriptorDeployDetails() {
try {
Map<String, String> checksums =
FileChecksumCalculator.calculateChecksums(artifactoryTask.ivyDescriptor, MD5_ALGORITHM, SHA1_ALGORITHM, SHA256_ALGORITHM);
artifactBuilder.md5(checksums.get(MD5_ALGORITHM)).sha1(checksums.get(SHA1_ALGORITHM)).sha256(SHA256_ALGORITHM);
artifactBuilder.md5(checksums.get(MD5_ALGORITHM)).sha1(checksums.get(SHA1_ALGORITHM)).sha256(checksums.get(SHA256_ALGORITHM));
} catch (Exception e) {
throw new GradleException(
"Failed to calculate checksums for artifact: " + artifactoryTask.ivyDescriptor.getAbsolutePath(), e);
Expand Down Expand Up @@ -280,7 +280,7 @@ private GradleDeployDetails getMavenDeployDetails() {
try {
Map<String, String> checksums =
FileChecksumCalculator.calculateChecksums(artifactoryTask.mavenDescriptor, MD5_ALGORITHM, SHA1_ALGORITHM, SHA256_ALGORITHM);
artifactBuilder.md5(checksums.get(MD5_ALGORITHM)).sha1(checksums.get(SHA1_ALGORITHM)).sha256(SHA256_ALGORITHM);
artifactBuilder.md5(checksums.get(MD5_ALGORITHM)).sha1(checksums.get(SHA1_ALGORITHM)).sha256(checksums.get(SHA256_ALGORITHM));
} catch (Exception e) {
throw new GradleException(
"Failed to calculate checksums for artifact: " + artifactoryTask.mavenDescriptor.getAbsolutePath(), e);
Expand Down Expand Up @@ -397,7 +397,7 @@ private GradleDeployDetails gradleDeployDetails(PublishArtifact artifact, String
.packageType(DeployDetails.PackageType.GRADLE);
try {
Map<String, String> checksums = FileChecksumCalculator.calculateChecksums(file, MD5_ALGORITHM, SHA1_ALGORITHM, SHA256_ALGORITHM);
deployDetailsBuilder.md5(checksums.get(MD5_ALGORITHM)).sha1(checksums.get(SHA1_ALGORITHM)).sha256(SHA256_ALGORITHM);
deployDetailsBuilder.md5(checksums.get(MD5_ALGORITHM)).sha1(checksums.get(SHA1_ALGORITHM)).sha256(checksums.get(SHA256_ALGORITHM));
} catch (Exception e) {
throw new GradleException("Failed to calculate checksums for artifact: " + file.getAbsolutePath(), e);
}
Expand Down

0 comments on commit 789f3e7

Please sign in to comment.