Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}