2021-12-11 17:35:21 +01:00
|
|
|
#!/usr/bin/env bash
|
2020-08-11 16:14:38 +02:00
|
|
|
set -e
|
2021-12-11 17:35:21 +01:00
|
|
|
|
|
|
|
declare -a zola_options
|
|
|
|
|
|
|
|
SCHABERNACK_ENV=${SCHABERNACK_ENV:-production}
|
|
|
|
|
|
|
|
if [ "${SCHABERNACK_ENV}" = "staging" ]; then
|
|
|
|
echo "Building staging version" >&2
|
|
|
|
zola_options+=(-u https://staging.schulischer-schabernack.de)
|
|
|
|
fi
|
|
|
|
|
2020-08-11 16:14:38 +02:00
|
|
|
./metadata.py
|
2021-12-11 17:35:21 +01:00
|
|
|
zola build ${zola_options[@]}
|
2020-08-11 16:14:38 +02:00
|
|
|
echo "Encoding…"
|
2020-08-24 23:02:08 +02:00
|
|
|
./encode.py
|
2020-08-11 16:14:38 +02:00
|
|
|
./metadata.py
|
2021-12-11 17:35:21 +01:00
|
|
|
zola build ${zola_options[@]}
|
|
|
|
|
|
|
|
if [ "${SCHABERNACK_ENV}" = "staging" ]; then
|
|
|
|
cp static/robots.txt.staging public/robots.txt
|
|
|
|
fi
|