illegal-traditions/scripts/build.sh

24 lines
534 B
Bash
Raw Normal View History

2022-11-05 02:41:01 +00:00
#!/usr/bin/env bash
# Set up logging.
log() { echo "🛠️ $(basename $0): $@"; }
# Move into the root folder.
cd $(dirname $(dirname $0))
# Make sure everything is set up.
log "setting up project"
./scripts/setup.sh || exit 1
# Clean up the old files.
log "cleaning old builds"
rm -f dmoonfire*
# Build the project outputs.
log "building PDF"
./node_modules/.bin/mfgames-writing-format build pdf || exit 1
log "building EPUB"
./node_modules/.bin/mfgames-writing-format build epub || exit 1
epubcheck dmoonfire*.epub || exit 1