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

Add chocolatey-recommended metadata #30

Closed
wants to merge 2 commits into from
Closed

Add chocolatey-recommended metadata #30

wants to merge 2 commits into from

Conversation

heaths
Copy link
Member

@heaths heaths commented Mar 4, 2017

This is current blocked on nuproj/nuproj#281.

@msftclas
Copy link

msftclas commented Mar 4, 2017

@heaths,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@AppVeyorBot
Copy link

@heaths heaths added the blocked label Mar 4, 2017
@gep13
Copy link

gep13 commented Mar 14, 2017

@heaths the recommendation here would be to use choco pack to create the chocolatey package. At present, there is only some additional nuspec properties (which most nuget tools don't understand) but as chocolatey evolves, there could be other changes as well.

P.S. As a side note, what is the AppVeyorBot? What is controlling that?

@heaths
Copy link
Member Author

heaths commented Mar 14, 2017

@gep13 that would require completely replacing the existing project and writing my own. I can put it on the backlog but the whole point of using either NuProj (VS2015 and older support) or Nugetizer 3000 (planned VS2017 support from the NuGet team) was to avoid spending resources on maintaining a build when other projects exist. It would benefit the community if NuGet supported reading and writing custom metadata.

AppVeyorBot is the bot used by https://appveyor.com, which is a popular cloud build system that we (and many other projects) use for PR and CI builds.

@gep13
Copy link

gep13 commented Mar 14, 2017

@heaths said...
It would benefit the community if NuGet supported reading and writing custom metadata.

And I don't disagree with this. The point that I was making was that, for now, that is the only thing that differs between the packaging requirements for NuGet and Chocolatey packages, but this might not always be the case. Since Chocolatey is already installed on AppVeyor, you could have an additional build step in your appveyor.yml file that makes a call to choco pack <path to chocolatey.nuspec> rather than using NuProj or Nugetizer.

@heaths said...
AppVeyorBot is the bot used by https://appveyor.com, which is a popular cloud build system that we (and many other projects) use for PR and CI builds.

Yip, I am very familiar with AppVeyor, but didn't know that they had a bot for writing notifications directly into PR's, will have to have a look at that.

@heaths
Copy link
Member Author

heaths commented Mar 14, 2017

Ultimately, when you have many more build steps in your PR and CI builds that don't run on local dev boxes, mistakes happen (I maintain a number of build definitions for the Visual Studio setup engine). The point of having the NuProj project was to make sure when devs build they find any problems before pushing and triggering a PR build. I'm not adamant about it and would likely accept any PR to change our appveyor.yml file (which you can find information how we trigger the PR bot) and drop the nuget package project since NuProj isn't and likely won't be supported in VS2017 (I know the maintainer).

@gep13
Copy link

gep13 commented Mar 14, 2017

@heaths said...
The point of having the NuProj project was to make sure when devs build they find any problems before pushing and triggering a PR build.

Yip, I totally understand that idea. As one of the maintainers of the Cake project, we use the exact same build script to do:

  • compilation
  • packaging
  • publishing
  • notifications
  • etc

On 10 different CI Servers across 3 different operating systems.

Where we differ in approaches is that I would use external tooling, i.e. nuget.exe and choco.exe directly to do the packaging/publication work, rather than using a project approach. The reason I suggested doing the work in the appveyor.yml file is that I didn't see any other way with the current implementation, but I definitely agree that having the same build steps happen locally as on the CI Server makes total sense, and something that we advocate when using Cake.

@gep13
Copy link

gep13 commented Mar 14, 2017

As a side note, we currently have an open PR for adding VSWhere Aliases into Cake, which would allow something like the following in a build.cake file:

var latestInstallationPaths = VSAll();

Which would return all the installation paths for Visual Studio.

@heaths
Copy link
Member Author

heaths commented Mar 15, 2017

I'll consider options. We release from a VSTS build definition so we can real-sign the binaries so that would need custom build tasks as well as our appveyor.yml, thus necessitating synchronization. This is why I used a project within the solution that supports build via nuget restore.

@heaths
Copy link
Member Author

heaths commented Mar 15, 2017

I found https://www.nuget.org/packages/chocolatey/ so that should help things. I can put that in .nuget\packages.config for a global package to restore at the beginning of the solution build.

@AppVeyorBot
Copy link

@heaths
Copy link
Member Author

heaths commented Mar 15, 2017

Without the ability to pass properties to choco pack (and nuget pack fails with non-standard metadata properties) I'd have to move files around during the build. This is less than ideal for mere recommended/optional metadata.

I'm leaving this blocked and will see about adding support to nuget itself to at least pass through custom metadata.

@ferventcoder
Copy link

@heaths did this get implemented?

@heaths
Copy link
Member Author

heaths commented Sep 9, 2017

Yes, see #100 and the results of that work at http://chocolatey.org/packages/vswhere. Thanks for releasing the new version!

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

Successfully merging this pull request may close these issues.

5 participants