Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding MSBuild targets file #157

Merged
merged 2 commits into from
Nov 13, 2014
Merged

Conversation

JCapriotti
Copy link

Adds build targets to generate Pickles documentation via MSBuild. Reduces the amount of CSPROJ editing when adding Pickles.MSBuild to a project.

Adds build targets to generate Pickles documentation via MSBuild.
@JCapriotti
Copy link
Author

Also, I just found the picklesdoc.github.com site, so I will add documentation to that later today or tomorrow.

@dirkrombauts
Copy link
Member

Hi, Thanks for the contribution. I'm not a nuget specialist, so I am not entirely clear on what these changes will do. How will people use this?

@JCapriotti
Copy link
Author

I added some documentation here: picklesdoc/picklesdoc.github.com#10

NuGet supports adding build targets to a project. So I created a target that implements some of the boilerplate code... namely cleaning/creating a documentation directory and importing the PicklesDoc.Pickles.MSBuild.Tasks.dll. It uses some build parameters that basically match those in the Pickles MSBuild DLL to control things like formatting, output dir, etc.

Hopefully that makes sense! Let me know if I can clarify anything. One thing I wasn't able to verify in my documentation is if my links to the existing documents work.

@dirkrombauts
Copy link
Member

Do you know what happens when people update pickles - will the targets be added to the project again?

BTW: how experienced are you with nuget? Would you feel up to creating a chocolatey package?

@JCapriotti
Copy link
Author

The .targets file is added automatically during installation of the pickles NuGet package. So if someone installs or reinstalls the package, it will be there. Also, the target does nothing by default, the user has to set the Pickles_Generate property to True in their .csproj or build settings (I felt it was better to have the user set it, rather than just start generating docs without them knowing).

I can create a Chocolatey package... let me know what you need! I've been creating them here and there. https://github.com/jcapriotti/chocolatey

@dirkrombauts
Copy link
Member

Will the modifications that the user makes in their csproj be overwritten in a new version?

Chocolatey: I would like to have a chocolatey package for the command line version of pickles (called "pickles"), and one for the ui (called "picklesui"). In the process I'd also like to split the "one big zip file" that the build/setup script procudes into separate zip files for each runner.

@JCapriotti
Copy link
Author

No... NuGet just adds/removes this line:

<Import Project="..\packages\Pickles.MSBuild.0.18.3-beta\build\Pickles.MSBuild.targets" Condition="Exists('..\packages\Pickles.MSBuild.0.18.3-beta\build\Pickles.MSBuild.targets')" />

Everything else in the .csproj is left alone.

Yeah that Chocolatey packaging looks easy enough. I played around with your build scripts a bit when I was getting that build target in there and it was easy enough to figure out. Would you want me to do all those changes (including the splitting of the Zip file)? It is sort of a side-project for me but could do it soon enough.

@dirkrombauts
Copy link
Member

Yes, I'd be grateful if you could do the splitting of the zip-file too. I'm currently swamped with work myself :-(

I'll merge this pull request now, because the chocolatey and splitting things are other topics.

dirkrombauts added a commit that referenced this pull request Nov 13, 2014
Adding MSBuild targets file
@dirkrombauts dirkrombauts merged commit 7a4f1a8 into picklesdoc:master Nov 13, 2014
@JCapriotti
Copy link
Author

Thanks! Is the NuGet push automated? I noticed Nuget.org still has 0.18.2. And now that I think about it, should i have updated the version #? (I didn't)

@dirkrombauts
Copy link
Member

Hi,

No, the NuGet push is not automated, and you didn't need to update the version number.

There's a release branch: whenever I decide to release a new version, I increase the version number, push to the release branch, and manually upload the nuget packages produced by the build for the release branch.

I want to automate this process at some point, but I'd like to introduce an automatic smoke test first. I sort of have one: there are a few batch/ps/proj files that help but it still requires some knowledge and manual doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants