Skip to content

Conversation

nulltoken
Copy link
Member

Where can i find the Vnext nuget feed for the library

@nulltoken
Copy link
Member

@satish860 There's currently no NuGet feed for the vNext branch.

@satish860
Copy link
Author

I am planning to use it one of app . Currently I downloaded the solution and it has build errors . Is this currently being worked upon or Can I provide a pull request for the same. Want to check this before so I don't duplicate the effort for you .

@nulltoken
Copy link
Member

Currently I downloaded the solution and it has build errors

This is unexpected. Can you please share with us a repro case putting under the light those errors?

Can I provide a pull request for the same

Pull requests are always welcome! 😉 However, would it be regarding the build issue or the way to package and continuously pulish a vNext NuGet package?

@nulltoken
Copy link
Member

Regarding the Pre-release NuGet, it would indeed make much sense. Some really interesting work from @grenade in #273 can be a good starting point to make this happen and dealt with through our new windows CI Appveyor.

@nulltoken
Copy link
Member

Ok. I've started to work on this and transmuted the issue into a PR.

@nulltoken
Copy link
Member

Next steps:

  • Only perform the following upon a push to vNext or master,
  • Once a buiild succeeds, trigger a new "clean" build without the /property:ExtraDefine="LEAKS_IDENTIFYING" (a special mode witch ensure we properly release unmanaged handles, otherwise leading to failed tests).
  • Create the NuGet package from this "clean" build by leveveraging build.nuget.package.cmd
    • vNext -> PreRelease
    • master -> Stable
  • Drop the NativeBinaries folder from the symbols package
  • Publish as artifacts

Later, when thoroughly tested:

  • Add the API key as a secure variable
  • Publish NuGet package from vNext as preRelease
  • Publish NuGet package from master as stable

appveyor.yml Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FeodorFitsner Help 🙏 I can't seem to find the proper way to pass the APPVEYOR_REPO_COMMIT as a parameter to a .ps1 in the on_success event..

Note: If you want a good laugh, you can also peek at the pile of fixup commits in this PR to contemplate all my failed attempts 😿

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you also need a dot in the start, right?

Try:

. "C:\projects\libgit2sharp\nuget.package\BuildNugetPackage.ps1" $env:APPVEYOR_REPO_COMMIT

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appveyor.yml Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FeodorFitsner I may have (another 😊) problem here. This generates

[assembly: AssemblyInformationalVersion("))")]

Any idea? You can check the build log to get a better view at what's going on.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. I may have found a workaround. Switching from init to install seems to work. However, I think there might be something fishy in the pipeline (as shown above).

 - Fail the whole build upon a job failure
 - Cache the NuGet packages
 - Prefix the build version with the Assembly file version
Prior to generating the packages, the AssemblyInfo.cs is patched with
the build version. Additionally, the assembly informational version
will bear a `-pre` suffix would this build result from a push on a
branch which isn't `master`.

Produced packages will be published as build artifacts.

No packaging will be performed when the build has been triggered from a Pull Request.
@nulltoken
Copy link
Member

I think this is now ready for review.

The version used in the NuGet packages will be of the following formats

  • 0.20.1.{build} when generated from master
  • 0.20.1.{build}-pre when generated from vNext

Although this is not proper SemVer (4 segments instead of 3), Some local testing seem to show that NuGet can accomodate it.

A sample of the published NuGet packages can be found at
https://ci.appveyor.com/project/libgit2/libgit2sharp/build/0.20.1.86/job/cf0gf1ismcp4eaik/artifacts

@nulltoken
Copy link
Member

@davidebbo @davidfowl Regarding the comment above, how much is it dumb to rely on this? I know this is not semver compliant, but will NuGet still cope it for some time?

Note: When generating the package the command line issues the following:

Successfully created package 'C:\projects\libgit2sharp\LibGit2Sharp\LibGit2Sharp.0.20.1.86-pre.nupkg'.

WARNING: 1 issue(s) found with package 'LibGit2Sharp'.

Issue: Use semantic versioning
Description: Version "0.20.1.86-pre" does not follow semantic versioning guidelines.
Solution: Update your nuspec file or use the AssemblyInformationalVersion assembly attribute to specify a semantic version as described at http://semver.org. 

@davidebbo
Copy link
Contributor

@davidfowl is the vnext expert, so I'll let him take this one :)

@nulltoken nulltoken added this to the v0.21 milestone Jan 20, 2015
nulltoken added a commit that referenced this pull request Jan 20, 2015
@nulltoken nulltoken merged commit 2831bf9 into vNext Jan 20, 2015
@nulltoken nulltoken deleted the ntk/nuget_vNext branch January 20, 2015 22:09
@nulltoken
Copy link
Member

See #941 for a better versioning proposal

@nulltoken
Copy link
Member

@satish860 We've started publishing prerelease NuGet packages. Those are automatically generated by AppVeyor upon push/merge against vNext. They're manually published whenever new features/fixes are delivered.

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.

4 participants