I'm having a heck of time writing a batch script to both pack and push the resulting .nupkg
file up to my private nuget feed. I can call pack
just fine, but I don't know how to parse the name of the nupkg out of the resulting output in order to do the push
. Unfortunately, the version number auto-increments all the time, so I can't just make an assumption of what the resulting file would be named.
FWIW, I'm using myget.org for my private hosting, but this is could easily be applied to any host (including nuget.org).
nuget push supports wildcards, so you could do something like this:
REM delete existing nuget packages
del *.nupkg
nuget pack MyProject.csproj
nuget push *.nupkg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With