Add ability to sign binary releases
@@ -53,7 +53,7 @@ apply from: "${rootProject.rootDir}/gobblin-flavored-build.gradle"
task buildDistributionTar(type: Tar, overwrite: true) {
extension = 'tar.gz'
- baseName = project.name
+ baseName "apache-gobblin-incubating-bin"
compression = Compression.GZIP
into("conf") { from "../conf/" }
@@ -72,8 +72,22 @@ task buildDistributionTar(type: Tar, overwrite: true) {
copy {
from buildDir.path + '/distributions/' + baseName + '-' + project.version + '.tar.gz'
into project.rootDir.path
+
+ archiveName = "${baseName}-${project.version}.tar.gz"
+ ant.checksum file:"$buildDir.path/distributions/$archiveName", algorithm: "MD5", fileext: ".md5"
+ ant.checksum file:"$buildDir.path/distributions/$archiveName", algorithm: "SHA-512", fileext: ".sha512"
+ }
}
}
+
+// Signing requires a user ~/.gradle/gradle.properties file with signing information.
+// See: http://www.gradle.org/docs/current/userguide/signing_plugin.html
+signing {
+ // Sign the source archive if the proper configuration is in place to do so. Otherwise
+ // skip the signing process (it isn't required). This archive can be manually signed if
+ // needed.
+ required false
+ sign buildDistributionTar
}
assemble.dependsOn buildDistributionTar
