Skip to content

Commit 0604eda

Browse files
committed
fix the correct cache directory
1 parent 5289e5b commit 0604eda

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.platform.app.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ web:
4545
cron:
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).
5151
disk: 2048
@@ -63,7 +63,7 @@ hooks:
6363
sed -i 's@%kernel.root_dir%/../var/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
6464
bin/console --env=prod assets:install -n --no-debug
6565
bin/console --env=prod assetic:dump -n --no-debug
66-
deploy: ./bin/reloadFixtures.sh $PWD
66+
deploy: ./bin/reloadFixtures.sh $PWD true
6767

6868
runtime:
6969
extensions:

bin/reloadFixtures.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
DIR=$1
4+
PROD=$2||false
45
run () {
56
comment="+++ "$1" +++"
67
command=$2
@@ -21,10 +22,10 @@ run () {
2122
}
2223

2324
CACHE_DIR=${DIR}var/cache/prod
24-
if [ -d "${CACHE_DIR}" ]; then
25-
run "Remove cache directory:" "rm -rf ${CACHE_DIR}"
26-
else
25+
if [ "${PROD}" ]; then
2726
run "Remove cache directory:" "rm -rf /var/cache/prod"
27+
else
28+
run "Remove cache directory:" "rm -rf ${DIR}var/cache/prod"
2829
fi
2930
run "Drop and init dbal:" "php ${DIR}bin/console --env=prod doctrine:phpcr:init:dbal --drop --force -n -vvv"
3031
run "Init repositories:" "php ${DIR}bin/console --env=prod doctrine:phpcr:repository:init -n -vvv"

0 commit comments

Comments
 (0)