xref: /third_party/protobuf/csharp/install_dotnet_sdk.ps1
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/protobuf/csharp/
1ffe3c632Sopenharmony_ci#!/usr/bin/env powershell
2ffe3c632Sopenharmony_ci# Install dotnet SDK using the official dotnet-install.ps1 script
3ffe3c632Sopenharmony_ci
4ffe3c632Sopenharmony_ciSet-StrictMode -Version 2
5ffe3c632Sopenharmony_ci$ErrorActionPreference = 'Stop'
6ffe3c632Sopenharmony_ci
7ffe3c632Sopenharmony_ci# avoid "Unknown error on a send" in Invoke-WebRequest
8ffe3c632Sopenharmony_ci[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
9ffe3c632Sopenharmony_ci
10ffe3c632Sopenharmony_ci$InstallScriptUrl = 'https://dot.net/v1/dotnet-install.ps1'
11ffe3c632Sopenharmony_ci$InstallScriptPath = Join-Path  "$env:TEMP" 'dotnet-install.ps1'
12ffe3c632Sopenharmony_ci
13ffe3c632Sopenharmony_ci# Download install script
14ffe3c632Sopenharmony_ciWrite-Host "Downloading install script: $InstallScriptUrl => $InstallScriptPath"
15ffe3c632Sopenharmony_ciInvoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath
16ffe3c632Sopenharmony_ci
17ffe3c632Sopenharmony_ci# The SDK versions to install should be kept in sync with versions
18ffe3c632Sopenharmony_ci# installed by kokoro/linux/dockerfile/test/csharp/Dockerfile
19ffe3c632Sopenharmony_ci&$InstallScriptPath -Version 2.1.802
20ffe3c632Sopenharmony_ci&$InstallScriptPath -Version 3.1.301
21

Indexes created Thu Nov 07 10:32:03 CST 2024