2017-12-12 03:58:53 +03:00
|
|
|
#!/usr/bin/env bash
|
2019-03-19 13:09:34 +03:00
|
|
|
|
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
# Licensed under the MIT License.
|
|
|
|
|
2017-12-12 03:58:53 +03:00
|
|
|
echo "Executing post clone script in $pwd"
|
2021-02-17 10:10:15 +03:00
|
|
|
|
2021-03-18 18:01:20 +03:00
|
|
|
$nugetFileName = "NuGet.config"
|
|
|
|
$contentValue = "<?xml version=""1.0"" encoding=""utf-8""?>`n" +
|
|
|
|
"<configuration>`n" +
|
|
|
|
" <packageSources>`n" +
|
|
|
|
" <add key=""nuget"" value=""https://api.nuget.org/v3/index.json"" />`n" +
|
|
|
|
" <add key=""VSTSAC"" value=""https://msmobilecenter.pkgs.visualstudio.com/_packaging/AppCenter/nuget/v3/index.json"" />`n" +
|
|
|
|
" </packageSources>`n" +
|
|
|
|
" <activePackageSource>`n" +
|
|
|
|
" <add key=""All"" value=""(Aggregate source)"" />`n" +
|
|
|
|
" </activePackageSource>`n" +
|
|
|
|
" <packageSourceCredentials>`n" +
|
|
|
|
" <VSTSAC>`n" +
|
|
|
|
" <add key=""Username"" value=""mobilecenter"" />`n" +
|
|
|
|
" <add key=""ClearTextPassword"" value=""$env:NUGET_PASSWORD"" />`n" +
|
|
|
|
" </VSTSAC>`n" +
|
|
|
|
" </packageSourceCredentials>`n" +
|
|
|
|
"</configuration>`n"
|
|
|
|
|
|
|
|
if (Test-Path $nugetFileName) {
|
|
|
|
Remove-Item $nugetFileName
|
|
|
|
}
|
|
|
|
New-Item -Path . -Name $nugetFileName -Value $contentValue
|