validate the expected output package exists (#4795)
This commit is contained in:
parent
625717493b
commit
3815a95242
13
build.psm1
13
build.psm1
|
@ -702,7 +702,7 @@ function New-PSOptions {
|
|||
|
||||
if($RootInfo.RepoPath -ne $RootInfo.ValidPath)
|
||||
{
|
||||
$RootInfo['Warning'] = "Please ensure you repo is at the root of the file system and named 'PowerShell' (example: '$($RootInfo.ValidPath)'), when building and packaging for release!"
|
||||
$RootInfo['Warning'] = "Please ensure your repo is at the root of the file system and named 'PowerShell' (example: '$($RootInfo.ValidPath)'), when building and packaging for release!"
|
||||
$RootInfo['IsValid'] = $false
|
||||
}
|
||||
else
|
||||
|
@ -1837,8 +1837,15 @@ function New-MSIPackage
|
|||
|
||||
Remove-Item -ErrorAction SilentlyContinue *.wixpdb -Force
|
||||
|
||||
Write-Verbose "You can find the MSI @ $msiLocationPath" -Verbose
|
||||
$msiLocationPath
|
||||
if (Test-Path $msiLocationPath)
|
||||
{
|
||||
Write-Verbose "You can find the MSI @ $msiLocationPath" -Verbose
|
||||
$msiLocationPath
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Failed to create $msiLocationPath"
|
||||
}
|
||||
}
|
||||
|
||||
function Start-CrossGen {
|
||||
|
|
|
@ -540,7 +540,14 @@ function New-UnixPackage {
|
|||
}
|
||||
}
|
||||
|
||||
return $createdPackage
|
||||
if (Test-Path $createdPackage)
|
||||
{
|
||||
return $createdPackage
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Failed to create $createdPackage"
|
||||
}
|
||||
}
|
||||
|
||||
function New-StagingFolder
|
||||
|
@ -628,9 +635,15 @@ function New-ZipPackage
|
|||
Compress-Archive -Path $PackageSourcePath\* -DestinationPath $zipLocationPath
|
||||
}
|
||||
|
||||
log "You can find the Zip @ $zipLocationPath"
|
||||
$zipLocationPath
|
||||
|
||||
if (Test-Path $zipLocationPath)
|
||||
{
|
||||
log "You can find the Zip @ $zipLocationPath"
|
||||
$zipLocationPath
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Failed to create $zipLocationPath"
|
||||
}
|
||||
}
|
||||
#TODO: Use .NET Api to do compresss-archive equivalent if the pscmdlet is not present
|
||||
else
|
||||
|
@ -712,7 +725,15 @@ function New-NugetPackage
|
|||
log "Use -verbose to see output..."
|
||||
Start-NativeExecution -sb {dotnet $arguments} | Foreach-Object {Write-Verbose $_}
|
||||
|
||||
Get-ChildItem $nugetFolder\* | Select-Object -ExpandProperty FullName
|
||||
$nupkgFile = "${nugetFolder}\${nuspecPackageName}-${packageRuntime}.${nugetSemanticVersion}.nupkg"
|
||||
if (Test-Path $nupkgFile)
|
||||
{
|
||||
Get-ChildItem $nugetFolder\* | Select-Object -ExpandProperty FullName
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Failed to create $nupkgFile"
|
||||
}
|
||||
}
|
||||
|
||||
function New-SubFolder
|
||||
|
|
Loading…
Reference in a new issue