Skip to content

Commit 9f93fee

Browse files
authored
[Eng] Switch One Branch Nuget.Config (#25814)
* add script for nuget auth * update
1 parent 9ff5b67 commit 9f93fee

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

tools/NugetAuth/OneBranchNuget.Config

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<!-- Do not add any additional feeds if new packages are needed they need to come from nuget.org or our azure-sdk-for-net DevOps feed -->
6+
<add key="azure-powershell-onebranch" value="https://pkgs.dev.azure.com/azclitools/public/_packaging/azure-powershell-onebranch/nuget/v3/index.json" />
7+
</packageSources>
8+
<disabledPackageSources>
9+
<clear />
10+
</disabledPackageSources>
11+
</configuration>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$oneBranchConfigPath = Join-Path $PSScriptRoot 'OneBranchNuget.Config'
2+
$devConfigPath = Join-Path ($PSScriptRoot | Split-path -Parent | Split-path -Parent) 'Nuget.Config'
3+
4+
Get-Content $oneBranchConfigPath -Raw | Set-Content $devConfigPath -Force
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$scriptPath = Join-Path $PSScriptRoot installcredprovider.ps1
2+
New-Item -ItemType File -Path $scriptPath
3+
(Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1").Content | Set-Content $scriptPath -force
4+
5+
. $scriptPath -AddNetfx -Force
6+
7+
Remove-Item $scriptPath -Force
8+
9+
$configScriptPath = Join-Path $PSScriptRoot 'ReplaceOneBranchConfig.ps1'
10+
. $configScriptPath

0 commit comments

Comments
 (0)