Skip to content

Commit 6327a1a

Browse files
authored
Change the NuGet feed to use the governed PowerShell feed (#4044)
1 parent cb6037f commit 6327a1a

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
5+
<add key="PowerShell_PublicPackages" value="https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json" />
66
</packageSources>
77
<disabledPackageSources>
88
<clear />

tools/helper.psm1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,26 @@ function Test-XUnitTestResults
339339
throw "$($failedTests.failed) tests failed"
340340
}
341341
}
342+
343+
<#
344+
.SYNOPSIS
345+
Run 'dotnet restore' for all the target runtime that we are interested in to
346+
update packages on the CFS feed.
347+
This needs to be run on a MS employee's dev machine whenever there is update
348+
to the NuGet packages used in PSReadLine repo, so that the package and all its
349+
dependencies can be pull into the CFS feed from upstream feed.
350+
#>
351+
function Update-CFSFeed
352+
{
353+
$rids = @('win-x64', 'win-arm64', 'linux-x64', 'linux-arm', 'linux-arm64', 'osx-x64', 'osx-arm64')
354+
355+
Write-Host "1. clear all NuGet caches on the local machine." -ForegroundColor Green
356+
dotnet nuget locals all -c
357+
358+
Write-Host "2. restore for target runtimes." -ForegroundColor Green
359+
foreach ($rid in $rids) {
360+
Write-Host " - $rid" -ForegroundColor Green
361+
dotnet restore -r $rid ../test/PSReadLine.Tests.csproj
362+
dotnet restore -r $rid ../MockPSConsole/MockPSConsole.csproj
363+
}
364+
}

0 commit comments

Comments
 (0)