dweiss commented on a change in pull request #372:
URL: https://github.com/apache/lucene/pull/372#discussion_r726245984



##########
File path: lucene/distribution/build.gradle
##########
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.gradle.crypto.checksum.Checksum
+
+plugins {
+  id 'signing'
+  id 'org.gradle.crypto.checksum' version '1.1.0'
+}
+
+// This project puts together the Lucene "distribution", assembling bits and 
pieces
+// from across the project structure into release artifacts.
+
+ext {
+  releaseDir = file("${buildDir}/release")
+}
+
+// Prepare the "source" distribution artifact.
+apply from: 
buildscript.sourceFile.toPath().resolveSibling("source-release.gradle")
+
+// Prepare the "binary" distribution artifact.
+apply from: 
buildscript.sourceFile.toPath().resolveSibling("binary-artifacts.gradle")
+apply from: 
buildscript.sourceFile.toPath().resolveSibling("binary-release.gradle")
+
+// Configure maven artifact collection to a local build folder (required to 
collect artifacts for the release).
+apply from: 
buildscript.sourceFile.toPath().resolveSibling("collect-maven-artifacts.gradle")
+
+// Configure artifact signing.
+apply from: 
buildscript.sourceFile.toPath().resolveSibling("artifact-signing.gradle")
+
+
+// Set up the HTML-rendered "changes" distribution artifact by linking to 
documentation's output.
+configurations {
+  changesHtml
+}
+
+dependencies {
+  changesHtml project(path: ":lucene:documentation", configuration: 
"changesHtml")
+}
+
+
+// Compute checksums for release archives.
+task computeChecksums(type: Checksum) {
+  algorithm = Checksum.Algorithm.SHA512
+
+  files = objects.fileCollection()
+  [
+      tasks.assembleSourceTgz,
+      tasks.assembleBinaryZip,
+      tasks.assembleBinaryTgz,
+  ].each { dep ->
+    dependsOn dep
+    files += dep.outputs.files
+  }
+
+  outputDir = file("${buildDir}/checksums")
+}
+
+
+// Assemble everything needed in the release folder structure.
+task assembleRelease(type: Sync) {

Review comment:
       Exactly. I don't have a problem with this. I'm sure it could be made to 
run with gpg-agent too but it'd complicate these scripts unnecessarily (?).  
Folks don't like command-line passwords because they remain in shell history 
(and this is a correct argument) but if python scripts pass them in-process 
then this isn't a concern?
   
   Try it out, please. If anything needs changing with respect to python 
scripts, let me know. I'd really like to make the distribution leaner (see that 
other question on the dev list) but I think this can follow-up this merge.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to