From 8bc3425910faf51d33a62ebb706a4a1aa6d793a5 Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 24 Jun 2021 13:34:42 +0100 Subject: [PATCH] Update Powershell build script Runs dotnet run on the console app to genetate the schema & default location --- build/build.ps1 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build/build.ps1 b/build/build.ps1 index fb869738f3..7642160ce3 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -211,6 +211,21 @@ # /p:UmbracoBuild tells the csproj that we are building from PS, not VS }) + $ubuild.DefineMethod("CompileJsonSchema", + { + Write-Host "Generating JSON Schema for AppSettings" + Write-Host "Logging to $($this.BuildTemp)\json.schema.log" + + ## NOTE: We do not specify the --output switch + ## As by default we generate the file from the console app in the correct location + ## + ## src/Umbraco.Web.UI.NetCore/umbraco/config/appsettings-schema.json + &dotnet run --project "$($this.SolutionRoot)\src\JsonSchema\JsonSchema.csproj" ` + --verbosity detailed ` + -c Release > "$($this.BuildTemp)\json.schema.log" + + }) + $ubuild.DefineMethod("PrepareTests", { Write-Host "Prepare Tests" @@ -511,6 +526,8 @@ if ($this.OnError()) { return } $this.CompileUmbraco() if ($this.OnError()) { return } + $this.CompileJsonSchema() + if ($this.OnError()) { return } $this.PrepareTests() if ($this.OnError()) { return } $this.CompileTests()