Have local dotnet tools restored with NuGet packages

reverts 8f7e61339
This commit is contained in:
YoshiRulz 2024-06-07 21:45:16 +10:00
parent 84e337b05c
commit f58b4640c5
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
4 changed files with 7 additions and 3 deletions

View File

@ -43,7 +43,7 @@ jobs:
dotnet-version: "8"
- name: Test
run: dotnet tool restore && dotnet test BizHawk.sln -c Release -p:ContinuousIntegrationBuild=true
run: dotnet test BizHawk.sln -c Release -p:ContinuousIntegrationBuild=true
shell: pwsh
package:

View File

@ -52,4 +52,9 @@
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="all" />
<PackageReference Include="System.Resources.Extensions" PrivateAssets="all" />
</ItemGroup>
<Target Name="RestoreTools" BeforeTargets="PreBuildEvent">
<!-- why is this not the default behaviour -->
<Exec Command="dotnet tool restore"
StandardOutputImportance="low" /> <!-- this parameter has almost no documentation, hooray -->
</Target>
</Project>

View File

@ -12,5 +12,4 @@ if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages";
printf "running 'dotnet %s' in %s configuration, extra args: %s\n" "$cmd" "$config" "$*"
version=$(grep -Po "MainVersion = \"\K(.*)(?=\")" src/BizHawk.Common/VersionInfo.cs)
git_hash="$(git rev-parse --verify HEAD 2>/dev/null || printf "0000000000000000000000000000000000000000")"
dotnet tool restore >/dev/null || (echo "dotnet tool restore failed"; exit 1)
dotnet "$cmd" BizHawk.sln -c "$config" -m -clp:NoSummary -p:Version="$version" -p:SourceRevisionId="$git_hash" "$@"

View File

@ -16,7 +16,7 @@
<ItemGroup>
<Analyzer Include="$(MSBuildProjectDirectory)/../../References/BizHawk.SrcGen.VersionInfo.dll" />
</ItemGroup>
<Target Name="InstallGitHooks" BeforeTargets="PreBuildEvent">
<Target Name="InstallGitHooks" AfterTargets="PreBuildEvent">
<Exec Command="dotnet pwsh $(MSBuildProjectDirectory)/../../Dist/install_git_hooks.ps1" />
</Target>
</Project>