Skip to content

Commit

Permalink
Change the NuGet feed to use the governed PowerShell feed (#4044)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxian-dbw committed Jun 19, 2024
1 parent cb6037f commit 6327a1a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="PowerShell_PublicPackages" value="https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
23 changes: 23 additions & 0 deletions tools/helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,26 @@ function Test-XUnitTestResults
throw "$($failedTests.failed) tests failed"
}
}

<#
.SYNOPSIS
Run 'dotnet restore' for all the target runtime that we are interested in to
update packages on the CFS feed.
This needs to be run on a MS employee's dev machine whenever there is update
to the NuGet packages used in PSReadLine repo, so that the package and all its
dependencies can be pull into the CFS feed from upstream feed.
#>
function Update-CFSFeed
{
$rids = @('win-x64', 'win-arm64', 'linux-x64', 'linux-arm', 'linux-arm64', 'osx-x64', 'osx-arm64')

Write-Host "1. clear all NuGet caches on the local machine." -ForegroundColor Green
dotnet nuget locals all -c

Write-Host "2. restore for target runtimes." -ForegroundColor Green
foreach ($rid in $rids) {
Write-Host " - $rid" -ForegroundColor Green
dotnet restore -r $rid ../test/PSReadLine.Tests.csproj
dotnet restore -r $rid ../MockPSConsole/MockPSConsole.csproj
}
}

0 comments on commit 6327a1a

Please sign in to comment.