-
Notifications
You must be signed in to change notification settings - Fork 907
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
pack - Pass arbitrary properties like nuget pack #1313
Comments
Hi @heaths - this is not NuGet, so expect differences. That said, let's switch this from a bug report to an enhancement request and get it on the priority list. Note: this issue may already exist. |
All set up as an enhancement now - and it is open for community contribution as well. :) |
Thanks. I'm actually taking a look at implementing it now. Just wanted to get a bug open. After fixing it, could you guys push a new version soon - especially to nuget.org? (Seems you publish https://nuget.org/packages/chocolatey, if I'm not mistaken.) I can add it to my .nuget\packages.config and have it pulled down with |
Also, I checked before I opened (far from my first rodeo!) and couldn't find any current issue or PR similar. |
This may require NuGet 3.5+, which means this will be blocked by #508 - that will be a significant undertaking and is not open for community due to how much affect it will have on core choco - much testing, much rework to redo all enhancements we've made to nuget itself in all of the new places of NuGet v3+. |
Not sure I understand the relationship. There is a package published at https://www.nuget.org/packages/chocolatey/ that has no dependencies - just basically a raw OPC container that contains your binaries. With that I can simply run |
Passes properties through to the nuget pack command to replace variables in the nuspec file.
I was talking about arbitrary properties going into nuspec - if it is for fields that already exist in nuspec, you can ignore what I was talking about. |
Sorry for confusion - hard to copy parts I'm referencing when not at a computer |
This works since you basically cloned their nuspec OM (it seems - I didn't dig too deep) to add properties like But, yeah, this uses existing features in nuget to pass properties as if you specified |
As long as the properties translate to existing nuspec fields, I think you are fine. However if you are storing arbitrary properties, that is not supported in choco's implementation of NuGet.core:
|
And now I see why there is confusion. The properties element never made it into NuGet 3+ - https://github.com/NuGet/NuGet.Client/blob/870340673ba75a95407ab55ce1f46f57fe9bf25b/src/NuGet.Core/NuGet.Packaging/compiler/resources/nuspec.xsd (current dev branch) I'm lost as to why that might be since the issues were closed as fixed for NuGet v3.0. Ideas @jeffhandley? |
I'm no longer working on NuGet and I don't know. |
No, not storing arbitrary properties. This is to replace |
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
NuProj is not supported in Visual Studio 2017 nor will it probably ever be according to its creator/maintainer. Waiting on chocolatey/choco#1313 to be able to use that and uncomment Chocolatey-specific fields.
Sorry for all the comments. I'll remove the issue reference. Don't want to rack up a bunch of commits just trying to get appveyor to work. |
Resolves feedback on issue chocolatey#1313
Passes properties through to the nuget pack command to replace variables in the nuspec file.
+1 for this. One of the nice things about nuspec files when we create nuget packages are that we can use variables for things like path to the bin folder (using |
This is slated for vNext 👍 |
Pass properties through to the nuget pack command to replace variables in the nuspec file.
* pr1314: (GH-1313) pack - allow passing arbitrary properties
* stable: (GH-1313) pack - allow passing arbitrary properties
This is now in the codebase, but we don't yet have an ETA on 0.10.8. It could be pretty soon (sometime in August). |
@heaths thanks again for helping to get this in, glad it turned out to be quite easy! |
Just a note that I just pushed up a beta version with this included. https://chocolatey.org/packages/chocolatey/0.10.8-beta-20170806 |
Now that the change for chocolatey/choco#1313 has been released in version 0.10.8 use "choco pack" to add custom metadata for chocolatey.org.
Now that the change for chocolatey/choco#1313 has been released in version 0.10.8 use "choco pack" to add custom metadata for chocolatey.org.
What You Are Seeing?
Unlike
nuget pack
, I cannot pass properties tochoco pack
which blocks implementation of microsoft/vswhere#30.What is Expected?
I can pass
--properties "foo=1;bar=baz;"
tochoco pack
(using the same syntax asnuget pack
for uniformity). I want to be able to build packages in either configuration for 1) testing, and 2) to make sure no one who might have rearranged content broke package build. Only our release configuration would be published, but we want to build both flavors in case devs only build one (typically debug).The text was updated successfully, but these errors were encountered: