Skip to content
Merged
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
15 changes: 10 additions & 5 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ function Start-PSBuild {
[switch]$StopDevPowerShell,

[switch]$Restore,
# Accept a path to the output directory
# When specified, --output <path> will be passed to dotnet
[string]$Output,
[switch]$ResGen,
[switch]$TypeGen,
Expand Down Expand Up @@ -323,11 +325,8 @@ Fix steps:

# setup arguments
$Arguments = @("publish","--no-restore","/property:GenerateFullPaths=true")
if ($Output) {
$Arguments += "--output", $Output
}
elseif ($SMAOnly) {
$Arguments += "--output", (Split-Path $script:Options.Output)
if ($Output -or $SMAOnly) {
$Arguments += "--output", (Split-Path $Options.Output)
}

$Arguments += "--configuration", $Options.Configuration
Expand Down Expand Up @@ -599,6 +598,10 @@ function New-PSOptions {

[switch]$CrossGen,

# Accept a path to the output directory
# If not null or empty, name of the executable will be appended to
# this path, otherwise, to the default path, and then the full path
# of the output executable will be assigned to the Output property
[string]$Output,

[switch]$SMAOnly,
Expand Down Expand Up @@ -677,6 +680,8 @@ function New-PSOptions {
} else {
$Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework, $Runtime, "publish", $Executable)
}
} else {
$Output = [IO.Path]::Combine($Output, $Executable)
}

if ($SMAOnly)
Expand Down