LUCENE-10199: drop binary .zip artifact. (#407)

This commit is contained in:
Dawid Weiss 2021-10-26 21:21:30 +02:00 committed by GitHub
parent 08c0356664
commit fb6aaa7b2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 41 deletions

View File

@ -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...')

View File

@ -18,9 +18,6 @@
// Configure release artifact signing.
task signReleaseArchives(type: Sign) {
dependsOn tasks.assembleBinaryZip
sign tasks.assembleBinaryZip
dependsOn tasks.assembleBinaryTgz
sign tasks.assembleBinaryTgz

View File

@ -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
}
}

View File

@ -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 {