Skip to content

Commit

Permalink
Update Verify.Nupkg and ensure reproducible build branch
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKotsenas committed Jun 28, 2024
1 parent 35464ad commit a1f04bf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions build/targets/reproducible/Reproducible.targets
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>
2 changes: 1 addition & 1 deletion build/targets/tests/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PackageVersion Include="ReportGenerator" Version="5.3.6" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2-beta1.24314.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Verify.Nupkg" Version="1.1.5" />
<PackageVersion Include="Verify.Nupkg" Version="1.1.6" />
<PackageVersion Include="Verify.Xunit" Version="25.0.4" />
<PackageVersion Include="xunit" Version="2.8.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<releaseNotes>A changelog is available at https://github.com/rjmurillo/moq.analyzers/releases</releaseNotes>
<copyright>2017 Andrey Lipatkin</copyright>
<tags>moq, tdd, mocking, mocks, unittesting, agile, unittest, mock, test, analyzers</tags>
<repository type="git" url="https://github.com/********/moq.analyzers.git" commit="****************************************" />
<repository type="git" url="https://github.com/********/moq.analyzers.git" branch="********" commit="****************************************" />
</metadata>
</package>

0 comments on commit a1f04bf

Please sign in to comment.