From cc075c9eb6297e1b1e836967b21eb6a2efc4fb57 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Tue, 3 Jul 2018 11:01:39 -0700 Subject: [PATCH] Fix the location of produced binaries --- build.psm1 | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/build.psm1 b/build.psm1 index 1346da9..3763059 100644 --- a/build.psm1 +++ b/build.psm1 @@ -290,7 +290,7 @@ cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakeP } $FilesToCopy | ForEach-Object { - $srcPath = [IO.Path]::Combine((Get-Location), "bin", $Configuration, "CoreClr/$_") + $srcPath = [IO.Path]::Combine($PWD.Path, "bin", $Configuration, "CoreClr/$_") Write-Log " Copying $srcPath to $dstPath" Copy-Item $srcPath $dstPath @@ -309,25 +309,11 @@ cmd.exe /C cd /d "$location" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakePath" "$ "@ Write-Log " Executing Build Command for PowerShell.Core.Instrumentation: $command" Start-NativeExecution { Invoke-Expression -Command:$command } -<# + # Copy the binary to the packaging directory # NOTE: No PDB file; it's a resource-only DLL. - # VS2017 puts this in $HOME\source - $srcPath = [IO.Path]::Combine($HOME, "source", $Configuration, 'PowerShell.Core.Instrumentation.dll') - Copy-Item -Path $srcPath -Destination $dstPat -#> - - $builtBinary = (Get-ChildItem -Path $location -Filter 'PowerShell.Core.Instrumentation.dll' -Recurse | Select-Object -First 1).FullName - - if(-not (Test-Path $builtBinary)) - { - throw "PowerShell.Core.Instrumentation was not found under $location" - } - else - { - Copy-Item $builtBinary -Destination $dstPath -Force - } - + $srcPath = [IO.Path]::Combine($PWD.Path, $Configuration, 'PowerShell.Core.Instrumentation.dll') + Copy-Item -Path $srcPath -Destination $dstPath } finally { Pop-Location