-
Notifications
You must be signed in to change notification settings - Fork 18
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
Populate RepositoryBranch package metadata if available #27
Conversation
Only do so if PublishRepositoryUrl=true, meaning you want this information to be public in the first place. See RepositoryBranch in https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets.
This seems very reasonable, but I have to admit that my first thought was 'why isn't this in dotnet/sourcebuild?'. I looked in that repo and they don't do anything for RepositoryBranch, so I was surprised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM baased on the linked CI systems, but I'd appreciate Claire's look at it as well.
As documented in nuget (https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets) you can provide not only the repo URL, type and commit, but also the branch. But this information is not populated by default by the SourceLink package, neither the ReproducibleBuilds (unless the PR at dotnet/reproducible-builds#27 is merged). So just bring the code in that PR here until that's merged and shipped. Fixes Sergio0694#23
Gently pinging @clairernovotny 😉 |
Anything stopping this PR from merging? Polysharp also waiting on this ... Sergio0694/PolySharp#24 (comment) |
Thanks @kzu, and sorry for this one falling through the cracks. |
How does this ship? Is it automatic? Did it ship already? |
This still hasn't shipped: https://www.nuget.org/packages/DotNet.ReproducibleBuilds |
We've shipped this in 1.2.4 at long last! |
Only do so if PublishRepositoryUrl=true, meaning you want this information to be public in the first place.
See RepositoryBranch in https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets.