allegro/scripts/build.sh

24 lines
534 B
Bash
Raw Normal View History

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