mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:36:31 +00:00
zip update
This commit is contained in:
+19
-5
@@ -128,14 +128,28 @@ pipeline {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Output the final zip filename
|
||||
Write-Output $zipFilename
|
||||
# This is the critical fix - we need to make sure this is the last thing output
|
||||
# And ensure it's on its own line with no other text
|
||||
Write-Host "ZIPFILENAME=$zipFilename"
|
||||
exit 0
|
||||
'''
|
||||
|
||||
// Trim the output and set the environment variable
|
||||
env.CREATED_ZIP_FILENAME = zipFilenameOutput.trim()
|
||||
echo "Zip filename: ${env.CREATED_ZIP_FILENAME}"
|
||||
// Extract the zip filename from the PowerShell output by looking for "ZIPFILENAME=" prefix
|
||||
def outputLines = zipFilenameOutput.split('\n')
|
||||
def zipFilename = null
|
||||
for (line in outputLines) {
|
||||
if (line.trim().startsWith("ZIPFILENAME=")) {
|
||||
zipFilename = line.trim() - "ZIPFILENAME="
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (zipFilename) {
|
||||
env.CREATED_ZIP_FILENAME = zipFilename.trim()
|
||||
echo "Found zip filename: ${env.CREATED_ZIP_FILENAME}"
|
||||
} else {
|
||||
error "Failed to extract zip filename from PowerShell output. Check PowerShell script."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user