mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Clean build during daily build to ensure MSI package is generate correctly (#6334)
Clean build during the daily build to ensure MSI package is generated correctly - Do another clean build directly before packaging to clean up files that test has added # Conflicts: # tools/appveyor.psm1
This commit is contained in:
+14
-1
@@ -444,8 +444,13 @@ function Invoke-AppveyorFinish
|
||||
$packageParams += @{Version=$env:APPVEYOR_BUILD_VERSION}
|
||||
}
|
||||
|
||||
# Build clean before backing to remove files from testing
|
||||
Start-PSBuild -CrossGen -PSModuleRestore -Configuration 'Release' -ReleaseTag $releaseTag -Clean
|
||||
|
||||
# Build packages
|
||||
$packages = Start-PSPackage @packageParams -SkipReleaseChecks
|
||||
$msiObject = $packages | Where-Object { $_ -is [pscustomobject] -and $_.msi }
|
||||
$msi = $msiObject | Where-Object { $_.msi.EndsWith(".msi") } | Select-Object -ExpandProperty msi
|
||||
|
||||
$name = Get-PackageName
|
||||
|
||||
@@ -457,7 +462,15 @@ function Invoke-AppveyorFinish
|
||||
|
||||
$artifacts = New-Object System.Collections.ArrayList
|
||||
foreach ($package in $packages) {
|
||||
$null = $artifacts.Add($package)
|
||||
if($package -is [string])
|
||||
{
|
||||
$null = $artifacts.Add($package)
|
||||
}
|
||||
elseif($package -is [pscustomobject] -and $package.msi)
|
||||
{
|
||||
$null = $artifacts.Add($package.msi)
|
||||
$null = $artifacts.Add($package.wixpdb)
|
||||
}
|
||||
}
|
||||
|
||||
$null = $artifacts.Add($zipFilePath)
|
||||
|
||||
@@ -1656,6 +1656,18 @@ function Test-FileWxs
|
||||
|
||||
if(!$passed)
|
||||
{
|
||||
if($env:appveyor)
|
||||
{
|
||||
try
|
||||
{
|
||||
Push-AppveyorArtifact $HeatFilesWxsPath
|
||||
}
|
||||
catch
|
||||
{
|
||||
#ignore any error pushing the artifact
|
||||
}
|
||||
}
|
||||
|
||||
throw "Current files to not match {$FilesWxsPath}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user