@@ -8,7 +8,6 @@ $unpackedPackagesPath = [System.IO.Path]::GetFullPath("$releasePath\UnpackedPack
88mkdir $releasePath - Force | Out-Null
99
1010# Install prerequisite packages
11- # Install-Package -Name "Nito.AsyncEx" -RequiredVersion "3.0.1" -Source "nuget.org" -ProviderName "NuGet" -Destination $buildPath -Force
1211# Install-Package -Name "Newtonsoft.Json" -RequiredVersion "7.0.1" -Source "nuget.org" -ProviderName "NuGet" -Destination $buildPath -Force
1312
1413if ($buildVersion -eq $null ) {
@@ -20,33 +19,37 @@ if ($buildVersion -eq $null) {
2019 Write-Output " Latest build version on master is $buildVersion `r`n "
2120 }
2221 else {
23- Write-Error " PowerShellEditorServices build $buildVersion was not successful!" - ErrorAction " Stop"
22+ Write-Error " PowerShellEditorServices build $buildVersion was not successful!" - ErrorAction " Stop"
2423 }
2524}
2625
2726function Install-BuildPackage ($packageName , $extension ) {
2827 $uri = " https://ci.appveyor.com/nuget/powershelleditorservices/api/v2/package/{0}/{1}" -f $packageName.ToLower (), $buildVersion
2928 Write-Verbose " Fetching from URI: $uri "
30-
29+
3130 # Download the package and extract it
3231 $zipPath = " $releasePath \$packageName .zip"
3332 $packageContentPath = " $unpackedPackagesPath \$packageName "
3433 Invoke-WebRequest $uri - OutFile $zipPath - ErrorAction " Stop"
3534 Expand-Archive $zipPath - DestinationPath $packageContentPath - Force - ErrorAction " Stop"
3635 Remove-Item $zipPath - ErrorAction " Stop"
37-
36+
3837 # Copy the binary to the binary signing folder
3938 mkdir $binariesToSignPath - Force | Out-Null
4039 cp " $packageContentPath \lib\net45\$packageName .$extension " - Force - Destination $binariesToSignPath
41-
40+
41+ # Don't forget the x86 exe
42+ if ($extension -eq " exe" ) {
43+ cp " $packageContentPath \lib\net45\$packageName .x86.$extension " - Force - Destination $binariesToSignPath
44+ }
45+
4246 Write-Output " Extracted package $packageName ($buildVersion )"
4347}
4448
4549# Pull the build packages from AppVeyor
4650Install-BuildPackage " Microsoft.PowerShell.EditorServices" " dll"
4751Install-BuildPackage " Microsoft.PowerShell.EditorServices.Protocol" " dll"
4852Install-BuildPackage " Microsoft.PowerShell.EditorServices.Host" " exe"
49- Install-BuildPackage " Microsoft.PowerShell.EditorServices.Host.x86" " exe"
5053
5154# Open the BinariesToSign folder
5255& start $binariesToSignPath
0 commit comments