You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/10/26 19:21:38 UTC

[lucene] branch main updated: LUCENE-10199: drop binary .zip artifact. (#407)

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new fb6aaa7  LUCENE-10199: drop binary .zip artifact. (#407)
fb6aaa7 is described below

commit fb6aaa7b2c28749c93553c7ffb7e5f5a372ad9b3
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Tue Oct 26 21:21:30 2021 +0200

    LUCENE-10199: drop binary .zip artifact. (#407)
---
 dev-tools/scripts/smokeTestRelease.py       |  6 ++--
 lucene/distribution/artifact-signing.gradle |  3 --
 lucene/distribution/binary-release.gradle   | 43 ++++++++---------------------
 lucene/distribution/build.gradle            |  3 --
 4 files changed, 14 insertions(+), 41 deletions(-)

diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index b58da4c..4f7e55a 100755
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -252,8 +252,7 @@ def checkSigs(urlString, version, tmpDir, isSigned, keysFile):
       raise RuntimeError('lucene: artifact %s has wrong sigs: expected %s but got %s' % (artifact, expectedSigs, sigs))
 
   expected = ['lucene-%s-src.tgz' % version,
-              'lucene-%s.tgz' % version,
-              'lucene-%s.zip' % version]
+              'lucene-%s.tgz' % version]
 
   actual = [x[0] for x in artifacts]
   if expected != actual:
@@ -1163,8 +1162,7 @@ def smokeTest(java, baseURL, gitRevision, version, tmpDir, isSigned, local_keys,
   print('Test Lucene...')
   checkSigs(lucenePath, version, tmpDir, isSigned, keysFile)
   if not downloadOnly:
-    for artifact in ('lucene-%s.tgz' % version, 'lucene-%s.zip' % version):
-      unpackAndVerify(java, tmpDir, artifact, gitRevision, version, testArgs)
+    unpackAndVerify(java, tmpDir, 'lucene-%s.tgz' % version, gitRevision, version, testArgs)
     unpackAndVerify(java, tmpDir, 'lucene-%s-src.tgz' % version, gitRevision, version, testArgs)
     print()
     print('Test Maven artifacts...')
diff --git a/lucene/distribution/artifact-signing.gradle b/lucene/distribution/artifact-signing.gradle
index 959a231..02eb775 100644
--- a/lucene/distribution/artifact-signing.gradle
+++ b/lucene/distribution/artifact-signing.gradle
@@ -18,9 +18,6 @@
 // Configure release artifact signing.
 
 task signReleaseArchives(type: Sign) {
-  dependsOn tasks.assembleBinaryZip
-  sign tasks.assembleBinaryZip
-
   dependsOn tasks.assembleBinaryTgz
   sign tasks.assembleBinaryTgz
 
diff --git a/lucene/distribution/binary-release.gradle b/lucene/distribution/binary-release.gradle
index 634f582..31bb7e2 100644
--- a/lucene/distribution/binary-release.gradle
+++ b/lucene/distribution/binary-release.gradle
@@ -53,8 +53,15 @@ configure(project(":lucene:distribution")) {
   }
 
 
-  // Distribution package (zip/tgz) content is the same so use the same closure to configure both tasks.
-  Closure<Void> distributionContent = { AbstractCopyTask task ->
+  task assembleBinaryTgz(type: Tar) {
+    description "Assemble binary Lucene artifact as a .tgz file."
+
+    archiveFileName = packageBaseName + ".tgz"
+    destinationDirectory = file(archiveFileName).parentFile
+
+    reproducibleFileOrder = true
+    compression = Compression.GZIP
+
     // Manually correct posix permissions (matters when assembling archives on Windows).
     filesMatching(["**/*.sh", "**/*.bat"]) { copy ->
       copy.setMode(0755)
@@ -66,8 +73,8 @@ configure(project(":lucene:distribution")) {
 
     // Cherry-pick certain files from the root.
     from(project(':').projectDir, {
-        include "LICENSE.txt"
-        include "NOTICE.txt"
+      include "LICENSE.txt"
+      include "NOTICE.txt"
     })
 
     // Cherry-pick certain files from the lucene module.
@@ -89,7 +96,7 @@ configure(project(":lucene:distribution")) {
     moduleArtifactConfigurations.each {
       def toPath = it.module.path.replaceFirst("^:lucene:", "").replace(':', '/')
 
-      task.from(it.binaryArtifactsConfiguration, {
+      from(it.binaryArtifactsConfiguration, {
         into toPath
       })
     }
@@ -97,30 +104,4 @@ configure(project(":lucene:distribution")) {
     // Internal archive folder for all files.
     into "lucene-${rootProject.version}/"
   }
-
-  // Assemble distribution archives
-  task assembleBinaryZip(type: Zip) {
-    description "Assemble binary Lucene artifact as a .zip file."
-
-    archiveFileName = packageBaseName + ".zip"
-    destinationDirectory = file(archiveFileName).parentFile
-
-    metadataCharset = "UTF-8"
-    reproducibleFileOrder = true
-  }
-
-  task assembleBinaryTgz(type: Tar) {
-    description "Assemble binary Lucene artifact as a .tgz file."
-
-    archiveFileName = packageBaseName + ".tgz"
-    destinationDirectory = file(archiveFileName).parentFile
-
-    reproducibleFileOrder = true
-    compression = Compression.GZIP
-  }
-
-  // Apply the content configuration.
-  [tasks.assembleBinaryZip, tasks.assembleBinaryTgz].each { Task task ->
-    task.configure distributionContent
-  }
 }
diff --git a/lucene/distribution/build.gradle b/lucene/distribution/build.gradle
index f2e5a8f..2778720 100644
--- a/lucene/distribution/build.gradle
+++ b/lucene/distribution/build.gradle
@@ -64,7 +64,6 @@ task computeChecksums(type: Checksum) {
   files = objects.fileCollection()
   [
       tasks.assembleSourceTgz,
-      tasks.assembleBinaryZip,
       tasks.assembleBinaryTgz,
   ].each { dep ->
     dependsOn dep
@@ -88,7 +87,6 @@ task assembleRelease(type: Sync) {
   })
 
   from tasks.assembleSourceTgz
-  from tasks.assembleBinaryZip
   from tasks.assembleBinaryTgz
 
   from tasks.computeChecksums
@@ -106,7 +104,6 @@ task assembleRelease(type: Sync) {
 // sense at the user-level help.
 tasks.matching {it.name in [
     "assembleSourceTgz",
-    "assembleBinaryZip",
     "assembleBinaryTgz",
     "assembleRelease",
 ]}.all {