-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Verify.Nupkg and ensure reproducible build branch
- Loading branch information
1 parent
35464ad
commit a1f04bf
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
<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 (which breaks the Verify.Nupkg 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters