You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<PropertyGroupCondition="'$(RepositoryBranch)' == '' and '$(PublishRepositoryUrl)' == 'true'">
)
However, our logic strips the refs/heads/ and refs/tags/ from the branch name, which conflicts with NuGet/NuGet.Client#5923 available in the .NET 9 SDK, which gives the full ref name.
I think we should update our logic to also use the full ref name:
for consistency with the SDK
for reproducibility (so packages are tagged the same locally and in CI)
The text was updated successfully, but these errors were encountered:
We dug into this a bit and we should make this change. There are some users who are explicitly setting values like main, master, or using tools like GitVersion to get the repository branch - .NET 9's changes won't overwrite these values, and we should have a goal in this repo of upstreaming things that prove their value in this repo. This is a success story!
In preparation for #46, add some test to validate the current package
behavior. This doesn't test everything; future PRs should ensure the
code they're changing is tested.
The test flow is as follows:
1. Include `DotNet.ReproducibleBuilds`'s own .props and .targets files
into the test project's output
2. Create a temp directory
3. Create a `{project}.*.props` and `{project}.*.targets` file in the
`obj/` folder so that the .NET SDK will import the props and targets at
the correct time (this is basically to do a NuGet restore of the project
without needing to create the package or deal with package resolution)
4. Create a temp project and assert the behavior
We have custom logic to set the repository branch name based on CI provider environment variables (see
reproducible-builds/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.targets
Line 16 in 97f3184
However, our logic strips the
refs/heads/
andrefs/tags/
from the branch name, which conflicts with NuGet/NuGet.Client#5923 available in the .NET 9 SDK, which gives the full ref name.I think we should update our logic to also use the full ref name:
The text was updated successfully, but these errors were encountered: