Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 53 lines 2.6 kB view raw
1From 4267ee7fa5169b4fd5ce732118769e559806a390 Mon Sep 17 00:00:00 2001 2From: Vincent Haupert <mail@vincent-haupert.de> 3Date: Sat, 13 Mar 2021 21:52:03 +0100 4Subject: [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 | 10 +++------- 11 1 file changed, 3 insertions(+), 7 deletions(-) 12 13diff --git a/src/dir.proj b/src/dir.proj 14index 1c91e0c..8b27d3f 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@@ -39,14 +36,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:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86'" /> 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 --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 --no-build --logger:trx" ConsoleToMSBuild="true" /> 41 </Target> 42 43 <Target Name="Layout" DependsOnTargets="Clean;Build"> 44@@ -84,4 +80,4 @@ 45 <RemoveDir Directories="Test/bin" /> 46 <RemoveDir Directories="Test/obj" /> 47 </Target> 48-</Project> 49\ No newline at end of file 50+</Project> 51-- 522.30.1 53