23 lines
477 B
Bash
Executable file
23 lines
477 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
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
|
|
|
|
./metadata.py
|
|
zola build ${zola_options[@]}
|
|
echo "Encoding…"
|
|
./encode.py
|
|
./metadata.py
|
|
zola build ${zola_options[@]}
|
|
|
|
if [ "${SCHABERNACK_ENV}" = "staging" ]; then
|
|
cp static/robots.txt.staging public/robots.txt
|
|
fi
|