-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.sh
32 lines (25 loc) · 797 Bytes
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo "Get latest information from git"
git fetch --all
TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))
echo "Checkout to latest tag"
git checkout $TAG
git pull origin $TAG
echo "Install composer dependencies"
export COMPOSER_ALLOW_SUPERUSER=1; composer install
echo "clear cache"
php bin/console cache:clear
if [ -f .env.local ]; then
echo "run migrations"
php bin/console doctrine:migrations:migrate --no-interaction --query-time --all-or-nothing
else
echo "skipping migrations as there is no .env.local file yet."
echo "Create one this by running setup"
echo ""
fi
echo "run upgrade script"
bash upgradefiles/upgrade.sh
echo "install assets"
php bin/console assets:install public
echo "warmup cache"
php bin/console cache:warmup