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

Suggest a new output of nuget package #31

Open
carpnick opened this issue Aug 18, 2015 · 6 comments
Open

Suggest a new output of nuget package #31

carpnick opened this issue Aug 18, 2015 · 6 comments

Comments

@carpnick
Copy link

Example Nuspec file:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>github-release</id>
    <version>0.5.3</version>
    <title>github-release</title>
    <authors>Nicholas Carpenter</authors>
    <owners>Nicolas Hillegeer</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>CLI utility written in GO for Build Automation.  See https://github.com/aktau/github-release</description>
    <projectUrl>https://github.com/aktau/github-release</projectUrl>
  </metadata>

  <files>
  <file src="github-release.exe" target="tools" /> 
  </files>

</package>

Then call:

nuget pack github-release.nuspec

Attempting to build package from 'github-release.nuspec'.
Successfully created package 'C:\Users\ncarpenter\Desktop\github-release.0.5.3.nupkg'.
@carpnick
Copy link
Author

@aktau
Copy link
Member

aktau commented Aug 29, 2015

I'm not entirely sure what you mean. Do you mean that github-release should generate its own NuGet spec file?

@carpnick
Copy link
Author

No I was suggesting as part of your release process (pun-intended :)) - you currently ship a windows CLI utility in a zip. I was looking to integrate this into C# based builds by using the Nuget gallery (C# based depdency management) and NAnt

So the link I posted above was the repackaged zip as a Nuget package that could be easily integrated into C# based solutions/build systems. If you would like some more detail let me know.

@carpnick
Copy link
Author

The file I offered above was a sample file you could use to build a nuget package with your utility.

@aktau
Copy link
Member

aktau commented Aug 30, 2015

Well, I don't have anything against it. Yet I don't have a C# environment installed at home, do I need one? I tend to use only Linux and OSX since I don't feel like paying for a Windows license.

I guess my question is: what's your workflow for publishing such a package?

@carpnick
Copy link
Author

carpnick commented Sep 8, 2015

Usually this is Windows.

Basic Workflow.

  • Build the Windows based binaries (github-release.exe)
  • Call Nuget pack using the sample .nuspec to create a Nuget Package
  • Call Nuget push to publish it to nuget gallery

Looks like alot of people have figured out how to use mono to get Nuget to work on Linux/Mac:
https://github.com/dungpa/dsls-in-action-fsharp/blob/master/.nuget/nuget.sh
https://gist.github.com/andypiper/2636885
https://docs.nuget.org/consume/nuget-faq#getting-started

This isnt a problem if you dont have time for this. Just thought it would be an easy way to get you into the c# based build systems. I am using the utility from Nant, and I didnt want to deal with installing the utility globally on the build server. Different versions, etc....

So I am pushing all build utilities into Nuget packages - NAnt, NUnit, and this is another one of those. This makes the c# build server, real easy because all build utilities are downloaded from Nuget at build time.

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

No branches or pull requests

2 participants