Skip to content

Commit 44086f2

Browse files
committed
fixes issue where version was not being included
1 parent b99c353 commit 44086f2

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,17 +745,18 @@ tasks.register('release') {
745745

746746
println "Using 7-Zip: ${sevenZipExe}"
747747

748-
// Create 7z archive
748+
// Create 7z archive, ensuring the version directory is included at the root
749749
def command = [
750750
sevenZipExe,
751751
'a',
752752
'-t7z',
753753
archiveFile.absolutePath.toString(),
754-
'.'
754+
"${bundleName}${bundleVersion}"
755755
]
756756

757+
// Run from the parent prep directory so the root contains the version folder
757758
def process = new ProcessBuilder(command as String[])
758-
.directory(ghostscriptPrepPath)
759+
.directory(file(bundleTmpPrepPath))
759760
.redirectErrorStream(true)
760761
.start()
761762

@@ -783,7 +784,10 @@ tasks.register('release') {
783784

784785
println "Compressing ${bundleName}${bundleVersion} to ${archiveFile.name}..."
785786

786-
ant.zip(destfile: archiveFile, basedir: ghostscriptPrepPath)
787+
// Zip while preserving the version directory at the root
788+
ant.zip(destfile: archiveFile) {
789+
zipfileset(dir: bundleTmpPrepPath, includes: "${bundleName}${bundleVersion}/**")
790+
}
787791

788792
println "Archive created: ${archiveFile}"
789793

0 commit comments

Comments
 (0)