@@ -8,7 +8,6 @@ $unpackedPackagesPath = [System.IO.Path]::GetFullPath("$releasePath\UnpackedPack
8
8
mkdir $releasePath - Force | Out-Null
9
9
10
10
# Install prerequisite packages
11
- # Install-Package -Name "Nito.AsyncEx" -RequiredVersion "3.0.1" -Source "nuget.org" -ProviderName "NuGet" -Destination $buildPath -Force
12
11
# Install-Package -Name "Newtonsoft.Json" -RequiredVersion "7.0.1" -Source "nuget.org" -ProviderName "NuGet" -Destination $buildPath -Force
13
12
14
13
if ($buildVersion -eq $null ) {
@@ -20,33 +19,37 @@ if ($buildVersion -eq $null) {
20
19
Write-Output " Latest build version on master is $buildVersion `r`n "
21
20
}
22
21
else {
23
- Write-Error " PowerShellEditorServices build $buildVersion was not successful!" - ErrorAction " Stop"
22
+ Write-Error " PowerShellEditorServices build $buildVersion was not successful!" - ErrorAction " Stop"
24
23
}
25
24
}
26
25
27
26
function Install-BuildPackage ($packageName , $extension ) {
28
27
$uri = " https://ci.appveyor.com/nuget/powershelleditorservices/api/v2/package/{0}/{1}" -f $packageName.ToLower (), $buildVersion
29
28
Write-Verbose " Fetching from URI: $uri "
30
-
29
+
31
30
# Download the package and extract it
32
31
$zipPath = " $releasePath \$packageName .zip"
33
32
$packageContentPath = " $unpackedPackagesPath \$packageName "
34
33
Invoke-WebRequest $uri - OutFile $zipPath - ErrorAction " Stop"
35
34
Expand-Archive $zipPath - DestinationPath $packageContentPath - Force - ErrorAction " Stop"
36
35
Remove-Item $zipPath - ErrorAction " Stop"
37
-
36
+
38
37
# Copy the binary to the binary signing folder
39
38
mkdir $binariesToSignPath - Force | Out-Null
40
39
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
+
42
46
Write-Output " Extracted package $packageName ($buildVersion )"
43
47
}
44
48
45
49
# Pull the build packages from AppVeyor
46
50
Install-BuildPackage " Microsoft.PowerShell.EditorServices" " dll"
47
51
Install-BuildPackage " Microsoft.PowerShell.EditorServices.Protocol" " dll"
48
52
Install-BuildPackage " Microsoft.PowerShell.EditorServices.Host" " exe"
49
- Install-BuildPackage " Microsoft.PowerShell.EditorServices.Host.x86" " exe"
50
53
51
54
# Open the BinariesToSign folder
52
55
& start $binariesToSignPath
0 commit comments