Deploying ASP.NET 5 projects to MyGet
MyGet is a package repository and feed host that you can push nuget packages (amongst other things) at. Their free tier allows you to have public feeds at no cost, and I've been using it to distribute my ASP.NET 5 EntityFramework 6 packages. However, the process of;
- Creating a nuget package
- Deploying that package to myget
takes time, and is amplified when dealing with multiple packages. As such, I've written the following script to speed things up;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set out=c:\out\packages\%~nx1 | |
rm -rf %out% | |
call dnu pack --out %out% %~1 | |
c:\git\nuget.exe push %out%\Debug\* -ApiKey YOUR_API_KEY -Source https://www.myget.org/F/YOUR_FEED_NAME |
I can now call this on any project and that project will be packaged up and sent to myget. An example is as follows;
r
myget c:\git\Atquin.EntityFramework.Logging\src\Atquin.EntityFramework.Logging