mentorenwahl/docker/backend/scripts/build.sh
2022-01-08 13:29:22 +01:00

15 lines
349 B
Bash

#!/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