[ 
https://issues.apache.org/jira/browse/SOLR-15361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17331070#comment-17331070
 ] 

Dawid Weiss commented on SOLR-15361:
------------------------------------

There is something wrong about this patch, Chris. 
{code}
+  inputs.property(propName, null)
{code}
this should have the value of the property, not null. You don't even need the 
input for this task at all since you probably want to run it always. But more 
importantly:
{code}
+  if ( ! project.hasProperty(propName) ) {
+    gradle.taskGraph.whenReady { graph ->
+      if ( graph.hasTask(failUnlessGpgKeyProperty) ) {
+        // TODO: it would be really nice if taskGraph was an actual graph and 
we could report what tasks in (transitive) depend on us
+        throw new GradleException("'$propName' property must be set for GPG 
signing, please see help/gpgSigning.txt")
+      }
+    }
{code}
This should be replaced with a doFirst block and just a check on whether the 
valkue of the property was provided or not (and is not blank). If the task 
runs, you'll know it's part of the graph - no need to check it. So:
{code}
doFirst {
  if (!project.hasProperty("...")) {
    throw ...
  }
}
{code}

I am away for the weekend, will return on Monday.


> update gradle build to support gpg signing of tgz/zip distributions
> -------------------------------------------------------------------
>
>                 Key: SOLR-15361
>                 URL: https://issues.apache.org/jira/browse/SOLR-15361
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Chris M. Hostetter
>            Assignee: Chris M. Hostetter
>            Priority: Major
>             Fix For: main (9.0)
>
>         Attachments: SOLR-15361.patch, SOLR-15361.patch, SOLR-15361.patch
>
>
> the gradle build does not currently have any support for gpg signing the 
> distributions we produce.
> this is neccessary for releases, and for being able to "smoke test" our 
> Dockerfiles prior to release (by creating mock download servers to confirm 
> {{docker build}} can correctly fetch the {{tgz}} & {{tgz.asc}} files we point 
> it at)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to