From 8fce680430f00c9fc896e63a8348e2bcfb9810cf Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 10 May 2019 13:07:06 +1000 Subject: [PATCH] removes unused line, updates gitignore --- .gitignore | 1 + build/build.ps1 | 56 ++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 23ba01ebf0..585bd855b7 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,4 @@ build/temp/ # eof /src/Umbraco.Web.UI.Client/TESTS-*.xml +/src/ApiDocs/api/* diff --git a/build/build.ps1 b/build/build.ps1 index f1855833a8..55b686c98e 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -434,50 +434,47 @@ { Write-Host "Prepare C# Documentation" - $src = "$($this.SolutionRoot)\src" - $tmp = $this.BuildTemp - $out = $this.BuildOutput - $DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json" - $DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*" + $src = "$($this.SolutionRoot)\src" + $tmp = $this.BuildTemp + $out = $this.BuildOutput + $DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json" + $DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*" - # Build the solution in debug mode - $SolutionPath = Join-Path -Path $src -ChildPath "umbraco.sln" #restore nuget packages $this.RestoreNuGet() + # run DocFx + $DocFx = $this.BuildEnv.DocFx + + & $DocFx metadata $DocFxJson + & $DocFx build $DocFxJson - # run DocFx - $DocFx = $this.BuildEnv.DocFx - - & $DocFx metadata $DocFxJson - & $DocFx build $DocFxJson - - # zip it - & $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput + # zip it + & $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput }) $ubuild.DefineMethod("PrepareAngularDocs", { Write-Host "Prepare Angular Documentation" - $src = "$($this.SolutionRoot)\src" - $out = $this.BuildOutput - - $this.CompileBelle() + $src = "$($this.SolutionRoot)\src" + $out = $this.BuildOutput + + $this.CompileBelle() - "Moving to Umbraco.Web.UI.Client folder" - cd .\src\Umbraco.Web.UI.Client + "Moving to Umbraco.Web.UI.Client folder" + cd .\src\Umbraco.Web.UI.Client - "Generating the docs and waiting before executing the next commands" - & gulp docs | Out-Null + "Generating the docs and waiting before executing the next commands" + & gulp docs | Out-Null - # change baseUrl - $BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/" - $IndexPath = "./docs/api/index.html" - (Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath + # change baseUrl + $BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/" + $IndexPath = "./docs/api/index.html" + (Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath - # zip it - & $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Client\docs\api\*.*" + # zip it + & $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Client\docs\api\*.*" }) $ubuild.DefineMethod("Build", @@ -511,6 +508,7 @@ if ($this.OnError()) { return } $this.PostPackageHook() if ($this.OnError()) { return } + Write-Host "Done" })