ci(validate-docx-golden-tests2): fail on errors

The validator just prints errors, but always exited with nonzero.

Signed-off-by: Edwin Török <edwin@etorok.net>
This commit is contained in:
Edwin Török
2023-12-19 15:00:23 -08:00
committed by John MacFarlane
parent 0e86a84e33
commit c6892bec24
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ validate-docx-golden-tests2: ## validate docx golden tests using OOXMLValidator
test -d ./OOXML-Validator || \
(git clone https://github.com/mikeebowen/OOXML-Validator.git \
&& cd OOXML-Validator && dotnet build --configuration=Release)
dotnet run --configuration=Release --no-build --no-restore --project OOXML-Validator/OOXMLValidatorCLI -- test/docx/golden -r | json_reformat
sh ./tools/validate-docx2.sh test/docx/golden/
.PHONY: validate-docx-golden-tests2
validate-epub: ## generate an epub and validate it with epubcheck
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
set -eu
(for i in "$@"; do
dotnet run --configuration=Release --no-build --no-restore --project OOXML-Validator/OOXMLValidatorCLI -- "${i}" -r
done) >validation
json_reformat -s <validation
[ $(cat validation | wc -c) = 2 ]