Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,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
Expand Down Expand Up @@ -1813,8 +1813,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 {
Expand Down
31 changes: 26 additions & 5 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,14 @@ function New-UnixPackage {
}
}

return $createdPackage
if (Test-Path $createdPackage)
{
return $createdPackage
}
else
{
throw "Failed to create $createdPackage"
}
}

function New-StagingFolder
Expand Down Expand Up @@ -622,9 +629,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
Expand Down Expand Up @@ -706,7 +719,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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the full name... you don't need the get-childitem anymore.

if (Test-Path $nupkgFile)
{
Get-ChildItem $nugetFolder\* | Select-Object -ExpandProperty FullName
}
else
{
throw "Failed to create $nupkgFile"
}
}

function New-SubFolder
Expand Down