File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 45
45
cron :
46
46
symfony :
47
47
spec : ' * */2 * * *'
48
- cmd : ./bin/reloadFixtures.sh $PWD
48
+ cmd : ./bin/reloadFixtures.sh $PWD true
49
49
50
50
# The size of the persistent disk of the application (in MB).
51
51
disk : 2048
@@ -58,16 +58,12 @@ mounts:
58
58
# The hooks that will be performed when the package is deployed.
59
59
hooks :
60
60
build : |
61
- if [ "$PLATFORM_BRANCH" = master ]; then
62
- rm web/app_dev.php
63
- else
64
- echo "only remove app_dev.php on master"
65
- fi
61
+ rm web/app_dev.php
66
62
# place sqlite file into /tmp so that we can write to it during deploy
67
63
sed -i 's@%kernel.root_dir%/../var/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
68
64
bin/console --env=prod assets:install -n --no-debug
69
65
bin/console --env=prod assetic:dump -n --no-debug
70
- deploy : ./bin/reloadFixtures.sh $PWD
66
+ deploy : ./bin/reloadFixtures.sh $PWD true
71
67
72
68
runtime :
73
69
extensions :
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
DIR=$1
4
+ PROD=$2 || false
4
5
run () {
5
6
comment=" +++ " $1 " +++"
6
7
command=$2
7
8
echo ${comment}
8
9
echo " Command: " ${command}
9
- ${command}
10
+ ${command} > /tmp/output 2> /tmp/error
10
11
OUT=$?
11
12
if [ ${OUT} -eq 0 ]; then
12
13
echo " +++ DONE +++"
14
+ cat /tmp/output
13
15
echo
14
16
else
15
17
echo " +++ Errors +++"
18
+ cat /tmp/output
19
+ cat /tmp/error
16
20
exit ${OUT}
17
21
fi
18
22
}
19
23
20
24
CACHE_DIR=${DIR} var/cache/prod
21
- # run "Remove cache directory:" "rm -rf ${CACHE_DIR}"
22
- run " Drop and init dbal:" " php ${DIR} bin/console --env=prod doctrine:phpcr:init:dbal --drop --force -n"
23
- run " Init repositories:" " php ${DIR} bin/console --env=prod doctrine:phpcr:repository:init -n"
24
- run " Load date fixtures:" " php ${DIR} bin/console --env=prod doctrine:phpcr:fixtures:load -n"
25
- run " Warm up cache:" " php ${DIR} bin/console --env=prod cache:warmup -n --no-debug"
25
+ if [ " ${PROD} " ]; then
26
+ run " Remove cache directory:" " rm -rf /var/cache/prod"
27
+ else
28
+ run " Remove cache directory:" " rm -rf ${DIR} var/cache/prod"
29
+ fi
30
+ run " Drop and init dbal:" " php ${DIR} bin/console --env=prod doctrine:phpcr:init:dbal --drop --force -n -vvv"
31
+ run " Init repositories:" " php ${DIR} bin/console --env=prod doctrine:phpcr:repository:init -n -vvv"
32
+ run " Load date fixtures:" " php ${DIR} bin/console --env=prod doctrine:phpcr:fixtures:load -n -vvv"
33
+ run " Warm up cache:" " php ${DIR} bin/console --env=prod cache:warmup -n --no-debug -vvv"
You can’t perform that action at this time.
0 commit comments