From 6eeeb6c8eaa9f4969986ef878b75ce26817c6660 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 3 Sep 2020 22:25:43 +0100 Subject: [PATCH] skip building web previewer on osx. --- azure-pipelines.yml | 2 +- nukebuild/Build.cs | 2 +- nukebuild/BuildParameters.cs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 89504a498e..29d2c62caf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -81,7 +81,7 @@ jobs: export PATH="$PATH:$HOME/.dotnet/tools" dotnet --info printenv - nuke --target CiAzureOSX --configuration Release + nuke --target CiAzureOSX --configuration Release --skip-previewer - task: PublishTestResults@2 inputs: diff --git a/nukebuild/Build.cs b/nukebuild/Build.cs index 5b4e5a5bad..24398accbb 100644 --- a/nukebuild/Build.cs +++ b/nukebuild/Build.cs @@ -126,12 +126,12 @@ partial class Build : NukeBuild Target CompileHtmlPreviewer => _ => _ .DependsOn(Clean) + .OnlyWhenStatic(() => !Parameters.SkipPreviewer) .Executes(() => { var webappDir = RootDirectory / "src" / "Avalonia.DesignerSupport" / "Remote" / "HtmlTransport" / "webapp"; NpmTasks.NpmInstall(c => c - .AddPackages("typescript") .SetWorkingDirectory(webappDir) .SetArgumentConfigurator(a => a.Add("--silent"))); NpmTasks.NpmRun(c => c diff --git a/nukebuild/BuildParameters.cs b/nukebuild/BuildParameters.cs index 149716b416..a167e9d892 100644 --- a/nukebuild/BuildParameters.cs +++ b/nukebuild/BuildParameters.cs @@ -19,10 +19,14 @@ public partial class Build [Parameter("force-nuget-version")] public string ForceNugetVersion { get; set; } + [Parameter("skip-previewer")] + public bool SkipPreviewer { get; set; } + public class BuildParameters { public string Configuration { get; } public bool SkipTests { get; } + public bool SkipPreviewer {get;} public string MainRepo { get; } public string MasterBranch { get; } public string RepositoryName { get; } @@ -63,6 +67,7 @@ public partial class Build // ARGUMENTS Configuration = b.Configuration ?? "Release"; SkipTests = b.SkipTests; + SkipPreviewer = b.SkipPreviewer; // CONFIGURATION MainRepo = "https://github.com/AvaloniaUI/Avalonia";