From 5b20164dda4727335c6e390bbb840d8e20f8e0b5 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Sun, 21 Jul 2019 20:02:43 -0500 Subject: [PATCH] Minor tweaks to doc build script --- appveyor.yml | 5 ++++- docs/build.ps1 | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 627ca312..31b3f2f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -90,7 +90,10 @@ for: #if ($lastexitcode -ne 0){ # throw [System.Exception] "docfx build failed with exit code $lastexitcode." #} - & .\build.ps1 + powershell .\build.ps1 + if ($lastexitcode -ne 0){ + throw [System.Exception] "docfx build failed with exit code $lastexitcode." + } } if ($env:APPVEYOR_REPO_TAG -eq "true") diff --git a/docs/build.ps1 b/docs/build.ps1 index be297e16..389ab67e 100644 --- a/docs/build.ps1 +++ b/docs/build.ps1 @@ -1,15 +1,15 @@ -& docfx metadata - # read SelfConfig, remove wierd bits, load it, load Newtonsoft, and turn it into a schema -$newtonsoftLoc = "./nuget/Newtonsoft.Json.12.0.2/lib/netstandard2.0/Newtonsoft.Json.dll" -$newtonsoftSchemaLoc = "./nuget/Newtonsoft.Json.Schema.3.0.11/lib/netstandard2.0/Newtonsoft.Json.Schema.dll" +$newtonsoftLoc = "$(pwd)/nuget/Newtonsoft.Json.12.0.2/lib/netstandard2.0/Newtonsoft.Json.dll" +$newtonsoftSchemaLoc = "$(pwd)/nuget/Newtonsoft.Json.Schema.3.0.11/lib/netstandard2.0/Newtonsoft.Json.Schema.dll" $selfConfigLoc = "../IPA.Loader/Config/SelfConfig.cs" if (!(Test-Path "nuget" -PathType Container)) { - nuget install Newtonsoft.Json -Version 12.0.2 -source https://api.nuget.org/v3/index.json -o nuget - nuget install Newtonsoft.Json.Schema -Version 3.0.11 -source https://api.nuget.org/v3/index.json -o nuget + nuget install Newtonsoft.Json -Version 12.0.2 -source https://api.nuget.org/v3/index.json -o "$(pwd)/nuget" + nuget install Newtonsoft.Json.Schema -Version 3.0.11 -source https://api.nuget.org/v3/index.json -o "$(pwd)/nuget" } +& docfx metadata + if ((Test-Path $newtonsoftLoc -PathType Leaf) -and (Test-Path $selfConfigLoc -PathType Leaf)) { # The files we need exist, lets do this!