From 7207dfc95a468ce64411dbc51aad9bbaa9f31963 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 23 Jul 2020 10:10:40 +0200 Subject: [PATCH] [xharness] Improve restoring NuGets for Xamarin.Mac projects in the makefile by depending on the csproj files in addition to the packages.conf files. Packages are listed in the csproj when we're using package references. Also only list files in git, otherwise we pick up all the generated project files as well. --- tests/xharness/MakefileGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xharness/MakefileGenerator.cs b/tests/xharness/MakefileGenerator.cs index d9a55323ed49..f34afdb76a0e 100644 --- a/tests/xharness/MakefileGenerator.cs +++ b/tests/xharness/MakefileGenerator.cs @@ -66,7 +66,7 @@ public static void CreateMacMakefile (IHarness harness, IEnumerable t writer.WriteLine ("\t$(Q) touch $@"); writer.WriteLine (); var nuget_restore_dependency = ".stamp-nuget-restore-mac"; - writer.WriteLine ("PACKAGES_CONFIG:=$(shell find . -name packages.config)"); + writer.WriteLine ("PACKAGES_CONFIG:=$(shell git ls-files -- '*.csproj' '*/packages.config' | sed 's/ /\\\\ /g')"); writer.WriteLine ($"{nuget_restore_dependency}: tests-mac.sln $(PACKAGES_CONFIG)"); writer.WriteLine ("\t$(Q_XBUILD) $(SYSTEM_XIBUILD) -t -- /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore tests-mac.sln"); writer.WriteLine ("\t$(Q) touch $@");