diff --git a/{{cookiecutter.paper_repo_name}}/Jenkinsfile b/{{cookiecutter.paper_repo_name}}/Jenkinsfile index 9fb8c41..0595d36 100644 --- a/{{cookiecutter.paper_repo_name}}/Jenkinsfile +++ b/{{cookiecutter.paper_repo_name}}/Jenkinsfile @@ -35,13 +35,14 @@ make withEnv(["HOME=${env.WORKSPACE}"]) { sh """ rm -f autozoil.xml -make autozoil.xml +make autozoil """ }} post { always { - archiveArtifacts artifacts: 'autozoil.xml', fingerprint: true + archiveArtifacts artifacts: 'autozoil*.xml', fingerprint: true + junit testResults: 'autozoil-external-check.xml', skipPublishingChecks: true // junit testResults: 'autozoil.xml' } } diff --git a/{{cookiecutter.paper_repo_name}}/Makefile b/{{cookiecutter.paper_repo_name}}/Makefile index c12faf5..3fa987d 100644 --- a/{{cookiecutter.paper_repo_name}}/Makefile +++ b/{{cookiecutter.paper_repo_name}}/Makefile @@ -13,6 +13,8 @@ CURRENT_DIR=$(shell pwd) AUTOZOIL_DIR?=/opt/autozoil AUTOZOIL_LOCALE={{cookiecutter.locale}} +EXTERNAL_PLAIN_TEXT_CHECKER= + space := $(subst ,, ) ifneq (,$(wildcard appendix.tex)) @@ -96,6 +98,16 @@ scores/%.txt: autozoil-log.txt: $(CONTENT_TEX_SOURCES) cd $(AUTOZOIL_DIR) && set -o pipefail && ./autozoil --locale $(AUTOZOIL_LOCALE) $(CONTENT_TEX_SOURCES_WITH_DIR) --alt-log-file $(CURRENT_DIR)/$(PAPER_ID).log | tee $(CURRENT_DIR)/$@ + +ifeq ($(EXTERNAL_PLAIN_TEXT_CHECKER),) +autozoil: autozoil.xml +else +autozoil: autozoil.xml autozoil-external-check.xml + +autozoil-external-check.xml: sentences.txt + curl -X POST -H "Content-Type: multipart/form-data" -F "file=@sentences.txt" $(EXTERNAL_PLAIN_TEXT_CHECKER) > $@ +endif + autozoil.xml: $(CONTENT_TEX_SOURCES) cd $(AUTOZOIL_DIR) && set -o pipefail && ./autozoil --locale $(AUTOZOIL_LOCALE) $(CONTENT_TEX_SOURCES_WITH_DIR) --format xml --alt-log-file $(CURRENT_DIR)/$(PAPER_ID).log --exit-with-zero > $(CURRENT_DIR)/autozoil.xml