1From 5a850bb7946ce5c0620ac5f072d93a77cc064219 Mon Sep 17 00:00:00 2001
2From: Aaron Andersen <aaron@fosslib.net>
3Date: Thu, 29 Sep 2022 10:12:28 -0400
4Subject: [PATCH] [PATCH] Patch dir.proj
5
6Don't execute Git for GitInfoCommitHash property
7Don't restore for build target
8Don't restore for test target
9---
10 src/dir.proj | 8 ++------
11 1 file changed, 2 insertions(+), 6 deletions(-)
12
13diff --git a/src/dir.proj b/src/dir.proj
14index 056a312..f029720 100644
15--- a/src/dir.proj
16+++ b/src/dir.proj
17@@ -2,9 +2,6 @@
18 <Project ToolsVersion="14.0" DefaultTargets="Build"
19 xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
20 <Target Name="GenerateConstant">
21- <Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true">
22- <Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
23- </Exec>
24 <Message Text="Building $(Product): $(GitInfoCommitHash) --- $(PackageRuntime)" Importance="high"/>
25
26 <ItemGroup>
27@@ -41,14 +38,13 @@
28 </ItemGroup>
29
30 <Target Name="Build" DependsOnTargets="GenerateConstant">
31- <MSBuild Targets="Restore" Projects="@(ProjectFiles)" StopOnFirstFailure="true" />
32 <MSBuild Targets="Publish" Projects="@(ProjectFiles)" BuildInParallel="false" StopOnFirstFailure="true" Properties="Configuration=$(BUILDCONFIG);PackageRuntime=$(PackageRuntime);Version=$(RunnerVersion);RuntimeIdentifier=$(PackageRuntime);PublishDir=$(MSBuildProjectDirectory)/../_layout/bin" />
33 <Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
34 </Target>
35
36 <Target Name="Test" DependsOnTargets="GenerateConstant">
37- <Exec Command="dotnet build Test/Test.csproj -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" />
38- <Exec Command="dotnet test Test/Test.csproj -c $(BUILDCONFIG) --no-build --logger:trx" ConsoleToMSBuild="true" />
39+ <Exec Command="dotnet build Test/Test.csproj --no-restore -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" />
40+ <Exec Command="dotnet test Test/Test.csproj --no-restore -c $(BUILDCONFIG) --no-build --logger:trx" ConsoleToMSBuild="true" />
41 </Target>
42
43 <Target Name="Layout" DependsOnTargets="Clean;Build">
44--
452.36.2