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:
Travis Plunk
2018-03-12 17:35:55 -07:00
parent 3f73749d99
commit 717d7dd9b6
2 changed files with 26 additions and 1 deletions
+14 -1
View File
@@ -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)
+12
View File
@@ -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}"
}
}