From 3f9b1833acc62fece4f07cc083d82fe3bc94bb19 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 11 Aug 2016 17:38:45 -0700 Subject: [PATCH] Fix Start-PSPackage for Release build on Windows --- build.psm1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index 2f0cffedb..4f5ee151a 100644 --- a/build.psm1 +++ b/build.psm1 @@ -844,9 +844,14 @@ function Start-PSPackage { $Version = (git --git-dir="$PSScriptRoot/.git" describe) -Replace '^v' } - Write-Warning "Please ensure you have previously run Start-PSBuild -Clean -CrossGen!" + if ($IsWindows) { + Write-Warning "Please ensure you have previously run Start-PSBuild -Clean -CrossGen -Configuration Release!" + $Source = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish -Configuration Release)) + } else { + Write-Warning "Please ensure you have previously run Start-PSBuild -Clean -CrossGen!" + $Source = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish)) + } - $Source = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish)) Write-Verbose "Packaging $Source" # Decide package output type