You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2018/12/07 21:23:05 UTC
tapestry-5 git commit: Adding SHA-256 checksums to the build
Repository: tapestry-5
Updated Branches:
refs/heads/5.4.x d4e4982f9 -> 8a82679cb
Adding SHA-256 checksums to the build
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8a82679c
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8a82679c
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8a82679c
Branch: refs/heads/5.4.x
Commit: 8a82679cb0ed010ba307a82b27acd15936b3539e
Parents: d4e4982
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
Authored: Fri Dec 7 19:22:26 2018 -0200
Committer: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
Committed: Fri Dec 7 19:22:26 2018 -0200
----------------------------------------------------------------------
build.gradle | 11 ++++++++++-
sha256.gradle | 25 +++++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8a82679c/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 8442a16..88a03b7 100755
--- a/build.gradle
+++ b/build.gradle
@@ -7,6 +7,7 @@ apply plugin: "sonar"
apply from: "ssh.gradle"
apply from: "md5.gradle"
+apply from: "sha256.gradle"
project.ext.versions = [
jetty: "7.6.11.v20130520",
@@ -14,7 +15,7 @@ project.ext.versions = [
testng: "6.8.21",
easymock: "3.3.1",
servletapi: "2.5",
- spock: "1.0-groovy-2.3",
+ spock: "1.0-groovy-2.5",
hibernate: "4.3.6.Final",
slf4j: "1.7.19",
geb: "0.10.0",
@@ -563,6 +564,13 @@ if (canDeploy) {
outputDir "$buildDir/md5"
}
+ task generateSHA256Checksums(type: GenSHA256) {
+ group "Release artifact"
+ description "Creates SHA-256 checksums for archives of source and JavaDoc"
+ source tasks.withType(Zip)
+ outputDir "$buildDir/sha256"
+ }
+
if (doSign) {
signing {
sign configurations.archives
@@ -590,6 +598,7 @@ if (canDeploy) {
destinationDir file(archiveDeployFolder())
from generateMD5Checksums
+ from generateSHA256Checksums
from configurations.uploads.allArtifacts.files
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8a82679c/sha256.gradle
----------------------------------------------------------------------
diff --git a/sha256.gradle b/sha256.gradle
new file mode 100644
index 0000000..97f356f
--- /dev/null
+++ b/sha256.gradle
@@ -0,0 +1,25 @@
+import java.security.MessageDigest
+
+class GenSHA256 extends SourceTask {
+
+ def outputDir
+
+ @OutputDirectory
+ File getOutputDir() { project.file(outputDir) }
+
+ @TaskAction
+ void writeSHA256s() {
+
+ source.each { file ->
+ MessageDigest digest = MessageDigest.getInstance("SHA-256")
+
+ digest.update(file.bytes)
+
+ def checksum = new BigInteger(1, digest.digest()).toString(16).padLeft(32, "0")
+
+ new File(outputDir, file.name + ".sha256").text = checksum
+ }
+ }
+}
+
+project.ext.GenSHA256 = GenSHA256.class