Skip to content

Instantly share code, notes, and snippets.

@PartTimeLegend
Created June 2, 2021 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PartTimeLegend/804ef0faf3b483009ee6eda3867deedb to your computer and use it in GitHub Desktop.
Save PartTimeLegend/804ef0faf3b483009ee6eda3867deedb to your computer and use it in GitHub Desktop.
OutOfDateNuget.ps1
dotnet tool update --global dotnet-outdated-tool
$errorCount = 0
Get-ChildItem -Path .\ -Filter *.csproj -Recurse -File -Name| ForEach-Object {
[System.IO.Path]::GetFileNameWithoutExtension($_)
dotnet outdated $_ -f -inc CB. -u
if ($LASTEXITCODE -ne 0)
{
$errorCount++
}
}
if ($errorCount -gt 0)
{
Write-Output "Failing build due to out-of-date Cloudbooking Packages"
#[Environment]::Exit(-1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment