Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
972 B
25 lines
972 B
5 years ago
|
#!/usr/bin/env powershell
|
||
|
# Install dotnet SDK based on the SDK version from global.json
|
||
|
|
||
|
Set-StrictMode -Version 2
|
||
|
$ErrorActionPreference = 'Stop'
|
||
|
|
||
|
# avoid "Unknown error on a send" in Invoke-WebRequest
|
||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||
|
|
||
|
$InstallScriptUrl = 'https://dot.net/v1/dotnet-install.ps1'
|
||
|
$InstallScriptPath = Join-Path "$env:TEMP" 'dotnet-install.ps1'
|
||
|
$GlobalJsonPath = Join-Path $PSScriptRoot '..' | Join-Path -ChildPath 'global.json'
|
||
|
|
||
|
# Resolve SDK version from global.json file
|
||
|
$GlobalJson = Get-Content -Raw $GlobalJsonPath | ConvertFrom-Json
|
||
|
$SDKVersion = $GlobalJson.sdk.version
|
||
|
|
||
|
# Download install script
|
||
|
Write-Host "Downloading install script: $InstallScriptUrl => $InstallScriptPath"
|
||
|
Invoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath
|
||
|
&$InstallScriptPath -Version $SDKVersion
|
||
|
|
||
|
# Also install dotnet SDK LTS which is required to run some of the tests
|
||
|
&$InstallScriptPath -Version 2.1.802
|