From 65040b39dc585678a638dde24c9f157ee5e573e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 26 Jul 2021 21:33:39 +0200 Subject: [PATCH] add drone CI to project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: commit 314aa4b9898f2f2c70ca488086c0c1fe5edc0c73 Author: Julien Fastré Date: Mon Jul 26 21:29:34 2021 +0200 restrict ci on tags commit c39b0d98d996b3ba5f74af7fcdd58fc3410a4a3a Author: Julien Fastré Date: Mon Jul 26 17:59:27 2021 +0200 add explanation to README about dependencies [ci-skip] commit b935e1ba684b43cd8250c37bb750efd5829c3eca Author: Julien Fastré Date: Mon Jul 26 17:55:50 2021 +0200 clone submodules commit 8dbc9aa1962856f15d41194d412fccfdfe2bdd34 Author: Julien Fastré Date: Mon Jul 26 17:52:23 2021 +0200 fix drone ci commit 61fb8a8f66a4edf00dfe31eebc2cf6575b7a8859 Author: Julien Fastré Date: Mon Jul 26 15:34:35 2021 +0200 first impl for drone --- .drone.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 2 +- README.md | 5 +++++ build-pandoc.sh | 10 ++++------ 4 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d2574bc --- /dev/null +++ b/.drone.yml @@ -0,0 +1,44 @@ +--- +kind: pipeline +type: docker +name: default + +steps: + +- name: submodules + image: alpine/git + commands: + - git submodule init + - git submodule update --recursive --remote + when: + event: tag + +- name: pandoc + image: pandoc/alpine:2.14 + commands: + - ls + - sh build-pandoc.sh latex > user-manual.tex + when: + event: tag + +- name: build-latex + image: ghcr.io/xu-cheng/texlive-full:latest + commands: + - latexmk -pdf -file-line-error -halt-on-error -interaction=nonstopmode -xelatex user-manual.tex + when: + event: tag + +- name: release + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_key + base_url: https://gitea.champs-libres.be + files: + - user-manual.pdf + checksum: + - sha512 + title: ${DRONE_COMMIT_REF} + prerelease: true + when: + event: tag diff --git a/.gitignore b/.gitignore index 2d1e77f..7620ceb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ build/* -user-manual.pdf +user-manual.* diff --git a/README.md b/README.md index 29ad1f1..94fca09 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,8 @@ Le fichier généré est `user-manual.pdf` L'utilisateur qui exécute la compilation est, par défaut, l'utilisateur ayant l'id `1000`. +## Dépendances latex + +### Awesomebox + +Pour créer des "box": https://www.ctan.org/tex-archive/graphics/awesomebox diff --git a/build-pandoc.sh b/build-pandoc.sh index 0c009c9..6bcc0e5 100755 --- a/build-pandoc.sh +++ b/build-pandoc.sh @@ -1,14 +1,12 @@ -#!/bin/bash - -echo "This script is for building pandoc natively" +#!/bin/sh # enter the current directory cd "$(dirname $0)" export PANDOC_DIR=pandoc/cl -files=( +export files=" src/parcours.md -) +" if [ -z $1 ]; then export target=pdf @@ -28,7 +26,7 @@ export LATEX_ARGS=" " -if [ $target == "debug" ]; then +if [ $target == "latex" ]; then pandoc $ARGS $LATEX_ARGS \ --to latex \ $files;