Merge pull request #542 from Microsoft/fix/download_nugets_for_release
Fix download internal nugets on vsts
This commit is contained in:
Коммит
b192a2b6ce
|
@ -1,9 +1,14 @@
|
|||
[CmdletBinding()]
|
||||
Param(
|
||||
[string]$NugetPassword
|
||||
)
|
||||
|
||||
$basePackage="Microsoft.AppCenter"
|
||||
$version=(Select-String -Path windows/nuspecs/nuget/AppCenter.nuspec -Pattern "version>(.*)<").Matches.Groups[1].Value
|
||||
foreach ($packageSuffix in @("", ".Analytics", ".Crashes", ".Distribute", ".Push")) {
|
||||
$package = "$basePackage$packageSuffix"
|
||||
$url = "https://msmobilecenter.pkgs.visualstudio.com/_apis/packaging/feeds/$env:NUGET_FEED_ID/nuget/packages/$package/versions/$version/content"
|
||||
$password = [System.Text.Encoding]::UTF8.GetBytes("appcenter:$env:NUGET_PASSWORD")
|
||||
$password = [System.Text.Encoding]::UTF8.GetBytes("appcenter:$NugetPassword")
|
||||
$password = [System.Convert]::ToBase64String($password)
|
||||
$webClient = New-Object System.Net.WebClient
|
||||
$webClient.Headers.Add("Authorization","Basic $password")
|
||||
|
|
Загрузка…
Ссылка в новой задаче