mentorenwahl/docker/backend/scripts/build.sh

15 lines
349 B
Bash
Raw Normal View History

2022-01-08 12:29:22 +00:00
#!/usr/bin/env sh
BASE_FLAGS="--production --static --verbose -s -p -t"
DEV_FLAGS="$BASE_FLAGS"
PROD_FLAGS="--release --no-debug $BASE_FLAGS"
echo "Building targets in '$1' mode..."
if [ "$1" = "development" ]; then
# shellcheck disable=SC2086
time shards build $DEV_FLAGS
else
# shellcheck disable=SC2086
time shards build $PROD_FLAGS
fi