Browse Source

Added docfx error propagation

Virgile Bello 7 years ago
parent
commit
2c14aaae86
3 changed files with 16 additions and 2 deletions
  1. 1 2
      build.bat
  2. 10 0
      en-build.ps1
  3. 5 0
      jp-build.ps1

+ 1 - 2
build.bat

@@ -1,2 +1 @@
-Call en-build.bat
-Call ./jp-build.bat
+Call en-build.bat && Call ./jp-build.bat

+ 10 - 0
en-build.ps1

@@ -15,6 +15,11 @@ if ($API)
     
     # Build metadata from C# source
     deps\docfx\docfx.exe metadata en/docfx.json
+	if ($LastExitCode -ne 0)
+	{
+		Write-Host "Failed to generate API metadata"
+		exit $LastExitCode
+	}
 
     Write-Host "Start Namespace build"
     function getNamespaceFilesLocation
@@ -339,6 +344,11 @@ Write-Host "Generating documentation..."
 
 # Output to both build.log and console
 deps\docfx\docfx.exe build en\docfx.json
+if ($LastExitCode -ne 0)
+{
+	Write-Host "Failed to build doc"
+	exit $LastExitCode
+}
 
 # Copy extra items
 Copy-Item en/ReleaseNotes/ReleaseNotes.md _site/en/ReleaseNotes/

+ 5 - 0
jp-build.ps1

@@ -37,6 +37,11 @@ Copy-Item en/docfx.json jp_tmp -Force
 (Get-Content jp_tmp/docfx.json) -replace "_site/en","_site/jp" | Set-Content jp_tmp/docfx.json
 deps\docfx\docfx.exe build jp_tmp\docfx.json
 Remove-Item jp_tmp -recurse 
+if ($LastExitCode -ne 0)
+{
+	Write-Host "Failed to build doc"
+	exit $LastExitCode
+}
 
 Write-Host "Japanese documentation built."
 Stop-Transcript