From 4ec7fcff671277d4436985b3d5e67d4576ec123f Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Thu, 11 Aug 2022 10:25:10 +0200 Subject: [PATCH] =?UTF-8?q?Utiliser=20une=20variable=20d=E2=80=99environne?= =?UTF-8?q?ment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hooks/build/marp-compiler/compile | 4 +--- hooks/containerbuild/doc-compiler/basic-env | 8 ++++++++ hooks/containerbuild/marp-compiler/add-packages | 1 - profiles/marp-compiler.conf | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 hooks/containerbuild/doc-compiler/basic-env diff --git a/hooks/build/marp-compiler/compile b/hooks/build/marp-compiler/compile index 6e57a90..d9287f3 100755 --- a/hooks/build/marp-compiler/compile +++ b/hooks/build/marp-compiler/compile @@ -1,6 +1,4 @@ #!/usr/bin/env bash -export DESTDIR=/dist -pushd /src +cd /src ./build -popd diff --git a/hooks/containerbuild/doc-compiler/basic-env b/hooks/containerbuild/doc-compiler/basic-env new file mode 100755 index 0000000..09f3e56 --- /dev/null +++ b/hooks/containerbuild/doc-compiler/basic-env @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +echo 'RUN mkdir -p /dist/public' >> Dockerfile +echo 'RUN mkdir -p /dist/private' >> Dockerfile +echo 'ENV PUBLIC_OUTPUT=/dist/public' >> Dockerfile +echo 'ENV PRIVATE_OUTPUT=/dist/private' >> Dockerfile diff --git a/hooks/containerbuild/marp-compiler/add-packages b/hooks/containerbuild/marp-compiler/add-packages index 644ffe4..6f5634a 100755 --- a/hooks/containerbuild/marp-compiler/add-packages +++ b/hooks/containerbuild/marp-compiler/add-packages @@ -6,4 +6,3 @@ echo 'RUN apk add --no-cache python3 bash' >> Dockerfile echo 'ENTRYPOINT [""]' >> Dockerfile echo 'RUN npm install -g --save-prod markdown-it markdown-it-mark markdown-it-include markdown-it-anchor markdown-it-table-of-contents' >> Dockerfile echo 'ENV NODE_PATH=/usr/local/lib/node_modules' >> Dockerfile -echo 'RUN mkdir /dist && mkdir /dist/private && mkdir /dist/public' >> Dockerfile diff --git a/profiles/marp-compiler.conf b/profiles/marp-compiler.conf index 3d47157..fec020c 100644 --- a/profiles/marp-compiler.conf +++ b/profiles/marp-compiler.conf @@ -6,6 +6,7 @@ default_image=marpteam/marp-cli:latest # Configuration de l’étape de pré-construction du conteneur [containerbuild] hooks= + containerbuild/doc-compiler/basic-env, containerbuild/marp-compiler/add-packages, containerbuild/marp-compiler/add-resources,