Skip to content

Instantly share code, notes, and snippets.

@loic-sharma
Created September 13, 2021 20:20
Show Gist options
  • Save loic-sharma/016918721f67ed33a797001fc64604c3 to your computer and use it in GitHub Desktop.
Save loic-sharma/016918721f67ed33a797001fc64604c3 to your computer and use it in GitHub Desktop.
Import NuGet packages to a new BaGet instance
$destination = "<BaGet package source>"
# Uncomment this line if you've configured BaGet to require an API key
# & nuget.exe setapikey "MY-API-KEY" -Source $destination
$packages = Get-ChildItem -Path .\ -Filter *.nupkg -Recurse -File
$packages |% {
& nuget.exe push -Source $destination $_.FullName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment