Commit 5f0a9d05 authored by Andreas Böttger's avatar Andreas Böttger 😬
Browse files

Update .gitlab-ci.yml

parent 8aa76ab9
Pipeline #33372 passed with stages
in 1 minute and 20 seconds
......@@ -108,71 +108,81 @@ build_pages:
- ./templates/studyreader
script:
- |
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
set -x
grep -rlP '\.\.\/abb\/' ./_raw/study-book || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')";
export lang
echo "Processing $line"
perl -i -pe 's!(\().*?(abb)!$1/static/studyreader/$ENV{"lang"}/$2!gm' "$line"
fi
done
(
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
set -x
(grep -rlP '\.\.\/abb\/' ./_raw/study-book || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')"
export lang
echo "Processing $line"
perl -i -pe 's!(\().*?(abb)!$1/static/studyreader/$ENV{"lang"}/$2!gm' "$line"
fi
done
)
- |
(
set -x
cd ./_raw/study-book;
cd ./_raw/study-book
if [ -f book.json ]; then
jq -r --arg base_path "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/" '.base_path |= $base_path' book.json | sponge book.json;
jq -r --arg base_path "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/" '.base_path |= $base_path' book.json | sponge book.json
fi;
if [ -f book.json ]; then
jq -r --arg pluginsConfig__downloadpdf_base "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/book_pdf/book.pdf?/" '.pluginsConfig.downloadpdf.base |= $pluginsConfig__downloadpdf_base' book.json | sponge book.json;
fi;
if [ -f book.json ]; then cat book.json; fi;
gitbook install;
gitbook build;
jq -r --arg pluginsConfig__downloadpdf_base "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/book_pdf/book.pdf?/" '.pluginsConfig.downloadpdf.base |= $pluginsConfig__downloadpdf_base' book.json | sponge book.json
fi
if [ -f book.json ]; then cat book.json; fi
gitbook install
gitbook build
(
# `gitbook build` bastelt aus einem absoluten Pfad einen relativen
grep -rlP '\.\.\/static\/' . || true) | while read -r line; do
set -x
(grep -rlP '\.\.\/static\/' . || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
# lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')";
# export lang
echo "Processing $line"
perl -i -pe 's!\.\.(/static)!$1!gm' "$line"
fi
done
)
)
)
- rm -rf ./templates/studyreader
- mv ./_raw/study-book/_book ./templates/studyreader
- |
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
set -x
grep -rlP '\.\.\/abb\/' ./_raw/book || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')";
export lang
echo "Processing $line"
perl -i -pe 's!(\().*?(abb)!$1/static/reader/$ENV{"lang"}/$2!gm' "$line"
fi
done
(
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
set -x
(grep -rlP '\.\.\/abb\/' ./_raw/book || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')"
export lang
echo "Processing $line"
perl -i -pe 's!(\().*?(abb)!$1/static/reader/$ENV{"lang"}/$2!gm' "$line"
fi
done
)
- |
(
set -x
cd ./_raw/book;
if [ -f book.json ]; then
jq -r --arg base_path "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/" '.base_path |= $base_path' book.json | sponge book.json;
jq -r --arg base_path "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/" '.base_path |= $base_path' book.json | sponge book.json
fi;
if [ -f book.json ]; then
jq -r --arg pluginsConfig__downloadpdf_base "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/book_pdf/book.pdf?/" '.pluginsConfig.downloadpdf.base |= $pluginsConfig__downloadpdf_base' book.json | sponge book.json;
jq -r --arg pluginsConfig__downloadpdf_base "/${CI_PROJECT_PATH}/~${CI_COMMIT_REF_NAME}/book_pdf/book.pdf?/" '.pluginsConfig.downloadpdf.base |= $pluginsConfig__downloadpdf_base' book.json | sponge book.json
fi;
if [ -f book.json ]; then cat book.json; fi;
gitbook install;
if [ -f book.json ]; then cat book.json; fi
gitbook install
gitbook build
(
# `gitbook build` bastelt aus einem absoluten Pfad einen relativen
grep -rlP '\.\.\/static\/' . || true) | while read -r line; do
set -x
(grep -rlP '\.\.\/static\/' . || true) | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
# lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')";
# export lang
echo "Processing $line"
perl -i -pe 's!\.\.(/static)!$1!gm' "$line"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment