File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments