diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py index b58da4cba94..4f7e55a38d0 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 959a231310b..02eb775000f 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 634f5826b93..31bb7e21b86 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 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 f2e5a8f578f..2778720e020 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 {