Add script to download nugets from release definition
This commit is contained in:
Родитель
27bd1dcb92
Коммит
a2671c00ab
|
@ -0,0 +1,11 @@
|
||||||
|
$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.Convert]::ToBase64String($password)
|
||||||
|
$webClient = New-Object System.Net.WebClient
|
||||||
|
$webClient.Headers.Add("Authorization","Basic $password")
|
||||||
|
$webClient.DownloadFile($url, "$pwd/$package.$version.nupkg")
|
||||||
|
}
|
Загрузка…
Ссылка в новой задаче