Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto update the nuspec file during the build process

I have been able to use NuGetter to create a build definition to automate the NuGet package creation process and to upload the package to the NuGet repository.

But, I would like to automate the process even further. The following is a list of steps I would like to automate as part of the build process:

  • The build process should be able to build the nuspec file, instead of me manually creating this file and saving it in the source control repository for the build process to pick it up.
  • The build process should be able to replace the nuspec fields.

The nuspec fields that I really want to be able to automate are:

Authors I would like the build process to replace this field in the nuspec file with the name of the person who is check-in the code.

releaseNotes I would like the build process to replace this field in the nuspec file with the check-in comment.

Has anyone been able to accomplish this? If so, how did you go about automating it?

like image 842
H A Avatar asked Dec 05 '12 01:12

H A


1 Answers

This may help.

I created an automated process to publish updates for an open source project.

https://github.com/DefinitelyTyped/NugetAutomation

Some things of interest to you are possibly.

  • How we use powershell to copy a 'template' nuspec and inject the fields we need. (you can use this to similarly replace the 'authors, releaseNotes' fields)
  • Ping the public nuget server to get the current version and increase the version.

It requires some Powershell knowledge, but I hope it gives you a start.

like image 167
Jason Jarrett Avatar answered Oct 12 '22 10:10

Jason Jarrett