forked from ppy/osu-web
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·43 lines (31 loc) · 1.07 KB
/
build.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
38
39
40
41
42
43
#!/bin/sh
set -u
set -e
# the user when provisioning is `vagrant`, but files are created by `www-data`
# don't fail if permissions don't get set on all files (useful when reloading the container)
chmod -R 777 storage bootstrap/cache || true
if [ ! -d node_modules ]; then
mkdir -p ~/node_modules
ln -snf ~/node_modules node_modules
fi
curl -sL https://getcomposer.org/installer > composer-installer
php composer-installer
# dummy user, no privilege github token to avoid github api limit
php composer.phar config -g github-oauth.github.com 98cbc568911ef1e060a3a31623f2c80c1786d5ff
rm -f bootstrap/cache/*.php bootstrap/cache/*.json
php composer.phar install
php artisan view:clear
# e.g. OSU_SKIP_DB_MIGRATION=1 ./build.sh to bypass running migrations
if [ -z "${OSU_SKIP_DB_MIGRATION:-}" ]; then
php artisan migrate --force
fi
php artisan lang:js resources/assets/js/messages.js
php artisan laroute:generate
if [ ! "${APP_DEBUG:-false}" = "true" ]
then
php artisan config:cache
php artisan route:cache
fi
command -v yarn || npm install -g yarn
yarn
yarn run production