grpc-tools build script fixes part 2

This commit is contained in:
murgatroid99 2019-02-12 12:59:40 -08:00
parent c349c201d4
commit b2756d2d78
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,5 @@
$ErrorActionPreference = "Stop"
Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force
Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201
Install-Module -Force -Name 7Zip4Powershell
@ -28,16 +30,17 @@ foreach ($Arch in $ArchList) {
} else {
$Generator = "Visual Studio 14 2015"
}
Remove-Item ($Base + "/build/bin/protoc.exe")
Remove-Item ($Base + "/build/bin/grpc_node_plugin.exe")
Remove-Item ($Base + "CMakeCache.txt")
Invoke-Expression "cmake ."
Invoke-Expression "cmake --build ."
& cmake .
& cmake --build .
Copy-Item ($ProtobufBase + "/protoc.exe") -Destination ($Base + "/build/bin/protoc.exe")
Copy-Item ($Base + "/grpc_node_plugin.exe") -Destination ($Base + "/build/bin/grpc_node_plugin.exe")
Compress-7Zip -Path ($Base + "/build") -Format Tar -ArchiveFileName ($Base + "/Archive.tar")
Compress-7Zip -Path ($Base + "/Archive.tar") -Format GZip -ArchiveFileName ($OutDir + "/windows-x64.tar.gz")
Remove-Item ($Base + "/build/bin/protoc.exe")
Remove-Item ($Base + "/build/bin/grpc_node_plugin.exe")
Remove-Item ($Base + "CMakeCache.txt")
}

View File

@ -3,6 +3,8 @@ cd ../..
git submodule update --init --recursive
@rem make sure msys binaries are preferred over cygwin binaries
set PATH=C:\tools\msys64\usr\bin;%PATH%
set ARTIFACTS_OUT=%cd%/artifacts
powershell -File ./packages/grpc-tools/build_binaries.ps1 || goto :error
goto :EOF