fsfe-website/build.sh
delliott bb45fc85ba
All checks were successful
continuous-integration/drone/push Build is passing
feat/build-improvements-2 (#4553)
Another attempt at #4516

Adds a small fix for tag map generation

#4516 introduces build failures, but testing indicates that those failures would have been resolved by a full rebuild.

Hence this pr.

Co-authored-by: Darragh Elliott <me@delliott.xyz>
Reviewed-on: #4553
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
2024-10-29 14:56:41 +00:00

49 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<-EOF
# build.sh Usage
## General
This script is a wrapper script over ./build/build_main.sh that provides nicer option names, and the options to serve the files.
For documentation on the build script itself see ./build/README.md
## Flags
### -f | --full
Perform a full rebuild of the webpages.
### -s | --serve
Serve the build webpages over localhost.
### --
Everything after this is passed directly to build_main.
See ./build/README.md for valid options.
EOF
exit 1
}
command="build_run"
serve=""
extra_args=""
while [ "$#" -gt 0 ]; do
case "$1" in
--full | -f)
command="build_into" && shift 1
;;
--serve | -s)
serve="true" && shift 1
;;
--)
shift 1
while [ "$#" -gt 0 ]; do
extra_args+="$1 "
shift 1
done
;;
*)
usage
;;
esac
done
mkdir -p ./output
./build/build_main.sh "$command" ./output/final --statusdir ./output/final/status.fsfe.org/fsfe.org/data $extra_args
if [[ "$serve" ]]; then
python3 ./serve-websites.py
fi