mirror of
https://github.com/azaion/annotations.git
synced 2026-04-23 01:16:31 +00:00
zip update
This commit is contained in:
+8
-7
@@ -80,6 +80,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
Write-Host "DEBUG: End of found zip listing."
|
Write-Host "DEBUG: End of found zip listing."
|
||||||
|
|
||||||
|
Write-Host "DEBUG: Existing zip files found count: $($existingZips.Count)"
|
||||||
|
|
||||||
$zipFilename = ""
|
$zipFilename = ""
|
||||||
$zipFound = $false
|
$zipFound = $false
|
||||||
@@ -89,10 +90,10 @@ pipeline {
|
|||||||
$newestZip = $existingZips | Select-Object -First 1
|
$newestZip = $existingZips | Select-Object -First 1
|
||||||
$zipFilename = $newestZip.Name
|
$zipFilename = $newestZip.Name
|
||||||
$zipFound = $true
|
$zipFound = $true
|
||||||
Write-Host "Found existing zip file: '$zipFilename'. Skipping creation."
|
Write-Host "DEBUG: Using newest existing zip file: '$zipFilename'. Skipping creation process."
|
||||||
} else {
|
} else {
|
||||||
# No existing zip files, proceed with creation
|
# No existing zip files, proceed with creation
|
||||||
Write-Host "No existing zip files found. Proceeding with creation."
|
Write-Host "DEBUG: No existing zip files found. Proceeding with file finding and zipping process."
|
||||||
|
|
||||||
Write-Host "Searching for files matching $exePattern and $binPattern in the current directory for zipping..."
|
Write-Host "Searching for files matching $exePattern and $binPattern in the current directory for zipping..."
|
||||||
|
|
||||||
@@ -158,8 +159,8 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Write the determined zip filename to a temporary file
|
# Write the determined zip filename to a temporary file
|
||||||
Write-Host "Writing zip filename '$zipFilename' to temporary file '$tempFilenameFile'..."
|
Write-Host "Writing determined zip filename '$zipFilename' to temporary file '$tempFilenameFile'..."
|
||||||
$zipFilename | Out-File -FilePath $tempFilenameFile -Encoding UTF8 -Force # Corrected: Using -FilePath
|
$zipFilename | Out-File -FilePath $tempFilenameFile -Encoding UTF8 -Force
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
''' // End powershell script
|
''' // End powershell script
|
||||||
@@ -176,10 +177,10 @@ pipeline {
|
|||||||
// This might happen if the PowerShell script failed before writing the file
|
// This might happen if the PowerShell script failed before writing the file
|
||||||
echo "Warning: Temporary filename file '${tempFilenameFile}' not found. Zip creation might have failed."
|
echo "Warning: Temporary filename file '${tempFilenameFile}' not found. Zip creation might have failed."
|
||||||
} finally {
|
} finally {
|
||||||
// Clean up the temporary file
|
// Clean up the temporary file using a powershell step
|
||||||
try {
|
try {
|
||||||
echo "Cleaning up temporary filename file: ${tempFilenameFile} using fileOperations"
|
echo "Cleaning up temporary filename file: ${tempFilenameFile} using powershell"
|
||||||
fileOperations([genSandboxConfig: true, operations: [[excludes: null, includes: tempFilenameFile, pattern: null, type: 'DELETE']]])
|
powershell "Remove-Item -Path '${tempFilenameFile}' -Force"
|
||||||
echo "Temporary filename file cleaned up."
|
echo "Temporary filename file cleaned up."
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
echo "Warning: Failed to clean up temporary filename file '${tempFilenameFile}': ${e.getMessage()}"
|
echo "Warning: Failed to clean up temporary filename file '${tempFilenameFile}': ${e.getMessage()}"
|
||||||
|
|||||||
Reference in New Issue
Block a user