-
Notifications
You must be signed in to change notification settings - Fork 45
/
update.sh
executable file
·37 lines (28 loc) · 706 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
33
34
35
36
37
#!/usr/bin/env bash
set -e
pre_run() {
php artisan down
git pull
composer install --no-interaction --no-dev --prefer-dist
}
update_ui() {
npm ci --no-audit --no-progress && npm run build
}
run_migrations() {
php artisan migrate --force
}
post_run() {
php artisan optimize
if [ -f /etc/systemd/system/traewelling-queue.service ]; then
sudo systemctl restart traewelling-queue
fi
if [ -f /etc/systemd/system/traewelling-queue-webhook.service ]; then
sudo systemctl restart traewelling-queue-webhook
fi
php artisan db:seed --class=Database\\Seeders\\Constants\\PermissionSeeder --force
php artisan up
}
pre_run
run_migrations
update_ui
post_run