From 67872130b1c5069addc212a3d6e50e2c7f1ad1d2 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Mon, 3 Sep 2018 18:12:01 +0800 Subject: [PATCH 1/3] build: pin Cake to version 0.26.1 as a workaround for #772 Following the pinning documentation in [1] that recommends to tweak the .gitignore file. [1] https://cakebuild.net/docs/tutorials/pinning-cake-version Fixes #772 --- .gitignore | 1 + tools/packages.config | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 tools/packages.config diff --git a/.gitignore b/.gitignore index 740321b79..dedb7eb01 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ TestCloud/ project.lock.json tools/ +!tools/packages.config .nugetapikey .mygetapikey *.xam diff --git a/tools/packages.config b/tools/packages.config new file mode 100644 index 000000000..ee1a5621d --- /dev/null +++ b/tools/packages.config @@ -0,0 +1,4 @@ + + + + From ed36be31644d7a046884fe687e20b447e9d6a69d Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Mon, 3 Sep 2018 18:06:02 +0800 Subject: [PATCH 2/3] build.cake: make Default target redirect to "libs" Fixes the following error I was getting: ``` Error: System.AggregateException: One or more errors occurred. ---> Cake.Core.CakeException: The target 'Default' was not found. at Cake.Core.CakeEngine+d__18.MoveNext () [0x0006b] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 at Cake.Scripting.BuildScriptHost+d__3.MoveNext () [0x0008d] in <1fcc25d1681b4774adb1422aeed887e6>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in :0 at Cake.Core.Scripting.ScriptHost.RunTarget (System.String target) [0x0000d] in :0 at Submission#0+<>d__0.MoveNext () [0x001d5] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState+d__9`1[TResult].MoveNext () [0x00186] in <7d37a385ddd24eeb96bd540d739cc157>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 at Microsoft.CodeAnalysis.Scripting.Script`1+d__21[T].MoveNext () [0x000a8] in <7d37a385ddd24eeb96bd540d739cc157>:0 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in :0 at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in :0 at System.Threading.Tasks.Task.Wait () [0x00000] in :0 at Cake.Scripting.Roslyn.RoslynScriptSession.Execute (Cake.Core.Scripting.Script script) [0x0019a] in <1fcc25d1681b4774adb1422aeed887e6>:0 at Cake.Core.Scripting.ScriptRunner.Run (Cake.Core.Scripting.IScriptHost host, Cake.Core.IO.FilePath scriptPath, System.Collections.Generic.IDictionary`2[TKey,TValue] arguments) [0x00358] in :0 at Cake.Commands.BuildCommand.Execute (Cake.CakeOptions options) [0x00026] in <1fcc25d1681b4774adb1422aeed887e6>:0 at Cake.CakeApplication.Run (Cake.CakeOptions options) [0x00015] in <1fcc25d1681b4774adb1422aeed887e6>:0 at Cake.Program.Main () [0x000d1] in <1fcc25d1681b4774adb1422aeed887e6>:0 ---> (Inner Exception #0) Cake.Core.CakeException: The target 'Default' was not found. at Cake.Core.CakeEngine+d__18.MoveNext () [0x0006b] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 at Cake.Scripting.BuildScriptHost+d__3.MoveNext () [0x0008d] in <1fcc25d1681b4774adb1422aeed887e6>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in :0 at Cake.Core.Scripting.ScriptHost.RunTarget (System.String target) [0x0000d] in :0 at Submission#0+<>d__0.MoveNext () [0x001d5] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState+d__9`1[TResult].MoveNext () [0x00186] in <7d37a385ddd24eeb96bd540d739cc157>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in :0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in :0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0 at Microsoft.CodeAnalysis.Scripting.Script`1+d__21[T].MoveNext () [0x000a8] in <7d37a385ddd24eeb96bd540d739cc157>:0 <--- ``` --- build.cake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.cake b/build.cake index 79a18c5a9..ab8263b86 100644 --- a/build.cake +++ b/build.cake @@ -80,5 +80,8 @@ Task ("clean") CleanDirectories ("./**/obj"); }); +Task("Default") + .IsDependentOn("libs"); + RunTarget (TARGET); From 789ee60e358be2d88cd4707278df93f60a957b0b Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Mon, 3 Sep 2018 18:09:57 +0800 Subject: [PATCH 3/3] build.sh: add more echo statements Which can help new devs figure out faster which of the commands failed. --- build.sh | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 build.sh diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 5c4cbe429..9ad638e4b --- a/build.sh +++ b/build.sh @@ -71,6 +71,7 @@ if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/ find . -type d ! -name . | xargs rm -rf fi +echo "Restoring tools from NuGet..." mono "$NUGET_EXE" install -ExcludeVersion if [ $? -ne 0 ]; then echo "Could not restore NuGet tools." @@ -85,6 +86,7 @@ popd >/dev/null if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then pushd "$ADDINS_DIR" >/dev/null + echo "Restoring addins from NuGet..." mono "$NUGET_EXE" install -ExcludeVersion if [ $? -ne 0 ]; then echo "Could not restore NuGet addins." @@ -98,6 +100,7 @@ fi if [ -f "$MODULES_PACKAGES_CONFIG" ]; then pushd "$MODULES_DIR" >/dev/null + echo "Restoring modules from NuGet..." mono "$NUGET_EXE" install -ExcludeVersion if [ $? -ne 0 ]; then echo "Could not restore NuGet modules." @@ -113,5 +116,6 @@ if [ ! -f "$CAKE_EXE" ]; then exit 1 fi +echo "Running Cake..." # Start Cake exec mono "$CAKE_EXE" $SCRIPT "${CAKE_ARGUMENTS[@]}" \ No newline at end of file