74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: build
|
|
|
|
steps:
|
|
- name: pandoc
|
|
pull: always
|
|
image: kingofdog/pandoc-latex:latest
|
|
commands:
|
|
- ./build.sh pandoc
|
|
- name: prepare-files
|
|
image: kingofdog/pandoc-latex:latest
|
|
commands:
|
|
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
|
|
- cp out/main.pdf "$(date +"%F-%H-%M")_${DRONE_REPO_NAME}_${DRONE_BUILD_NUMBER}.pdf"
|
|
depends_on:
|
|
- pandoc
|
|
- name: log
|
|
image: kingofdog/pandoc-latex:latest
|
|
commands:
|
|
- cat out/main.log
|
|
- ls -l out
|
|
- ls -l appendix/generated
|
|
depends_on:
|
|
- pandoc
|
|
- name: upload
|
|
image: plugins/s3
|
|
settings:
|
|
bucket:
|
|
from_secret: minio_bucket
|
|
access_key:
|
|
from_secret: minio_access_key
|
|
secret_key:
|
|
from_secret: minio_secret_key
|
|
source: ./*.pdf
|
|
region: eu-dogland
|
|
target: /
|
|
path_style: true
|
|
endpoint: https://minio.kingofdog.de
|
|
depends_on:
|
|
- prepare-files
|
|
- name: release
|
|
image: plugins/gitea-release
|
|
settings:
|
|
api_key:
|
|
from_secret: gitea_token
|
|
base_url: https://git.kingofdog.de
|
|
files: ./*.pdf
|
|
when:
|
|
event: tag
|
|
depends_on:
|
|
- prepare-files
|
|
- name: hunspell_chapters
|
|
image: kingofdog/hunspell:latest
|
|
failure: ignore
|
|
commands:
|
|
- sed -i -E 's/\\acf?s?p?\{([^}]+)\}/\1/g' chapter/out.tex
|
|
- sed -i -E 's/\\\w+\{[^}]+\}//g' chapter/out.tex
|
|
- export HUNSPELL_FINDINGS="`hunspell -l -i UTF-8 -d de_DE_frami,en_US -p ./.hunspellignore chapter/out.tex | sort | uniq`"
|
|
- export HUNSPELL_FINDINGS_COUNT=`echo $HUNSPELL_FINDINGS | wc -w`
|
|
- echo "Found $HUNSPELL_FINDINGS_COUNT different incorrect words."
|
|
- '[ -z "$HUNSPELL_FINDINGS" ] && exit 0 || exit 1'
|
|
depends_on:
|
|
- pandoc
|
|
- name: hunspell_appendix
|
|
image: kingofdog/hunspell:latest
|
|
failure: ignore
|
|
commands:
|
|
- export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
|
|
- echo $HUNSPELL_FINDINGS
|
|
- '[ -z "$HUNSPELL_FINDINGS" ] && exit 0 || exit 1'
|
|
depends_on:
|
|
- pandoc
|