Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions eng/targets/ReproducibleBuilds.targets
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
<Project>
<Target Name="SetRepositoryBranch" BeforeTargets="GenerateNuspec">
<!--
DotNet.ReproducibleBuilds tries to set the `$(RepositoryBranch)` for SourceLink, but only in CI scenarios.
This results in a difference in nuspec between local and CI tests.

To prevent the difference in behavior, set a default value directly from git.

Filed https://github.com/dotnet/sourcelink/issues/1243 to see if this could be moved into the base SourceLink
package.
-->
<Exec
Condition="'$(RepositoryBranch)' == ''"
ConsoleToMSBuild="true"
Command="git rev-parse --abbrev-ref HEAD">
<Output TaskParameter="ConsoleOutput" PropertyName="RepositoryBranch" />
</Exec>
</Target>
</Project>
</Project>