Enable TLS1.2 in the generatenupkg step (#7833)
This commit is contained in:
parent
b4da79a6ec
commit
85de1d64f7
1 changed files with 7 additions and 0 deletions
|
@ -11,6 +11,8 @@ param(
|
|||
[Parameter(Mandatory=$false)][string]$MmVersion
|
||||
)
|
||||
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bOR [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$NuGetDir = Join-Path $BinDir "nuget"
|
||||
$NuGetExe = Join-Path $NuGetDir "nuget.exe"
|
||||
$OutputDirectory = [System.IO.Path]::GetDirectoryName($NupkgFile)
|
||||
|
@ -29,6 +31,11 @@ if (-not (Test-Path $NuGetExe)) {
|
|||
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
|
||||
}
|
||||
|
||||
if (-not (Test-Path $NuGetExe)) {
|
||||
Write-Error "Could not download nuget.exe"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
if (Test-Path $NupkgFile) {
|
||||
Remove-Item -Force $NupkgFile
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue