Skip to content

Commit fcd53f7

Browse files
committed
Add init_benchmark.sh
1 parent fa74642 commit fcd53f7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

init_benchmark.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
function clearCacheAndLogs() {
4+
sudo /bin/rm -rf app/cache/*
5+
[ "$?" != "0" ] && exit 1
6+
sudo /bin/chmod -R 777 app/cache
7+
[ "$?" != "0" ] && exit 1
8+
9+
sudo /bin/rm -rf app/logs/*
10+
[ "$?" != "0" ] && exit 1
11+
sudo /bin/chmod -R 777 app/logs
12+
[ "$?" != "0" ] && exit 1
13+
}
14+
15+
function init() {
16+
clearCacheAndLogs
17+
18+
export SYMFONY_ENV=prod
19+
composer install --no-dev --optimize-autoloader
20+
[ "$?" != "0" ] && exit 1
21+
22+
php app/console assets:install --symlink --env=prod
23+
[ "$?" != "0" ] && exit 1
24+
php app/console assetic:dump --env=prod
25+
[ "$?" != "0" ] && exit 1
26+
27+
clearCacheAndLogs
28+
29+
return 0
30+
}

0 commit comments

Comments
 (0)