Commit 411e944c authored by Andreas Böttger's avatar Andreas Böttger 😬
Browse files

Update .gitlab-ci.yml

parent 70109cd3
Pipeline #33366 failed with stages
in 24 seconds
......@@ -109,19 +109,19 @@ build_pages:
script:
- |
(
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
grep -rlP '\.\.\/abb\/' ./_raw/book | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
export lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')"
set -x
grep -rlP '\.\.\/abb\/' ./_raw/study-book | while read -r line; do
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
perl -i -pe 's!(\().*?(abb)!$1/static/studyreader/$ENV{"lang"}/$2!gm' "$line"
fi
done
)
- |
(
cd ./_raw/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;
fi;
......@@ -130,15 +130,25 @@ build_pages:
fi;
if [ -f book.json ]; then cat book.json; fi;
gitbook install;
gitbook build
gitbook build;
)
- rm -rf ./templates/studyreader
- mv ./_raw/study-book/_book ./templates/studyreader
- |
(
# Language Verzeichnisse ermitteln und in den Pfad der Abbildungen integrieren
grep -rlP '\.\.\/abb\/' ./_raw/book | while read -r line; do
# NUR vier Sprachen werden berücksichtigt: de, en, fa, ar
if [ -n "$line" ]; then
export lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')"
echo "Processing $line"
perl -i -pe 's!(\().*?(abb)!$1/static/reader/$ENV{"lang"}/$2!gm' $line
fi
done
)
- rm -rf ./templates/reader
- mv ./_raw/book/_book ./templates/reader
- set -x
- grep -rlP '\.\.\/abb\/' ./_raw/study-book | while read -r line; do if [ -n "$line" ]; then export lang="$(echo "$line" | perl -pe 's!.*\/(de|en|fa|ar)\/.*!\1!g')"; echo "Processing $line"; perl -i -pe 's!(\().*?(abb)!$1/static/studyreader/$ENV{"lang"}/$2!gm' $line; fi; done
- |
(
cd ./_raw/study-book;
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;
fi;
......@@ -147,10 +157,10 @@ build_pages:
fi;
if [ -f book.json ]; then cat book.json; fi;
gitbook install;
gitbook build;
)
- rm -rf ./templates/studyreader
- mv ./_raw/study-book/_book ./templates/studyreader
gitbook build
)
- rm -rf ./templates/reader
- mv ./_raw/book/_book ./templates/reader
start_review:
stage: review
......
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