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 4545cron :
4646 symfony :
4747 spec : ' * */2 * * *'
48- cmd : ./bin/reloadFixtures.sh $PWD
48+ cmd : ./bin/reloadFixtures.sh $PWD true
4949
5050# The size of the persistent disk of the application (in MB).
5151disk : 2048
@@ -58,16 +58,12 @@ mounts:
5858# The hooks that will be performed when the package is deployed.
5959hooks :
6060 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
6662 # place sqlite file into /tmp so that we can write to it during deploy
6763 sed -i 's@%kernel.root_dir%/../var/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
6864 bin/console --env=prod assets:install -n --no-debug
6965 bin/console --env=prod assetic:dump -n --no-debug
70- deploy : ./bin/reloadFixtures.sh $PWD
66+ deploy : ./bin/reloadFixtures.sh $PWD true
7167
7268runtime :
7369 extensions :
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33DIR=$1
4+ PROD=$2 || false
45run () {
56 comment=" +++ " $1 " +++"
67 command=$2
78 echo ${comment}
89 echo " Command: " ${command}
9- ${command}
10+ ${command} > /tmp/output 2> /tmp/error
1011 OUT=$?
1112 if [ ${OUT} -eq 0 ]; then
1213 echo " +++ DONE +++"
14+ cat /tmp/output
1315 echo
1416 else
1517 echo " +++ Errors +++"
18+ cat /tmp/output
19+ cat /tmp/error
1620 exit ${OUT}
1721 fi
1822}
1923
2024CACHE_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