2020-05-20 15:10:55 +02:00
|
|
|
#!/bin/bash
|
2020-05-20 13:42:38 +02:00
|
|
|
|
|
|
|
ROOT_DIR=$(dirname $(readlink -f "$0"))/..
|
|
|
|
|
|
|
|
. ${ROOT_DIR}/.env
|
|
|
|
|
2020-05-25 20:11:58 +02:00
|
|
|
echo "Installing Composer packages..."
|
2020-06-25 00:37:48 +02:00
|
|
|
(cd ${ROOT_DIR} && composer install --no-dev)
|
2020-05-25 20:11:58 +02:00
|
|
|
|
2020-06-01 20:42:37 +02:00
|
|
|
echo "Installing Yarn packages..."
|
|
|
|
(cd ${ROOT_DIR}/public/static && yarn install)
|
|
|
|
|
2020-06-02 23:42:18 +02:00
|
|
|
echo "Migrating DB..."
|
|
|
|
(cd ${ROOT_DIR} && ./mapg migrate)
|
|
|
|
|
2020-05-20 13:42:38 +02:00
|
|
|
if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then
|
2020-05-24 15:42:29 +02:00
|
|
|
echo "Minifying JS, CSS and SVG files..."
|
|
|
|
${ROOT_DIR}/scripts/minify.sh
|
2020-05-20 13:42:38 +02:00
|
|
|
fi
|