Skip to content

Commit 1821119

Browse files
author
Anton Medvedev
committed
Merge pull request #262 from ZeeCoder/feature/sf3-dir-structure
Changed the symfony recipe to support the v3 dir structure
2 parents 92b3637 + a33e23d commit 1821119

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

recipe/symfony.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@
3030
env('env_vars', 'SYMFONY_ENV=prod');
3131
env('env', 'prod');
3232

33+
// Adding support for the Symfony3 directory structure
34+
set('bin_dir', 'app');
35+
set('var_dir', 'app');
36+
3337

3438
/**
3539
* Create cache dir
3640
*/
3741
task('deploy:create_cache_dir', function () {
3842
// Set cache dir
39-
env('cache_dir', '{{release_path}}/app/cache');
43+
env('cache_dir', '{{release_path}}/' . trim(get('var_dir'), '/') . '/cache');
4044

4145
// Remove cache dir if it exist
4246
run('if [ -d "{{cache_dir}}" ]; then rm -rf {{cache_dir}}; fi');
@@ -68,7 +72,7 @@
6872
*/
6973
task('deploy:assetic:dump', function () {
7074

71-
run("php {{release_path}}/app/console assetic:dump --env={{env}} --no-debug");
75+
run('php {{release_path}}/' . trim(get('bin_dir'), '/') . '/console assetic:dump --env={{env}} --no-debug');
7276

7377
})->desc('Dump assets');
7478

@@ -78,7 +82,7 @@
7882
*/
7983
task('deploy:cache:warmup', function () {
8084

81-
run('php {{release_path}}/app/console cache:warmup --env={{env}} --no-debug');
85+
run('php {{release_path}}/' . trim(get('bin_dir'), '/') . '/console cache:warmup --env={{env}} --no-debug');
8286

8387
})->desc('Warm up cache');
8488

@@ -88,7 +92,7 @@
8892
*/
8993
task('database:migrate', function () {
9094

91-
run("php {{release_path}}/app/console doctrine:migrations:migrate --env={{env}} --no-debug --no-interaction");
95+
run('php {{release_path}}/' . trim(get('bin_dir'), '/') . '/console doctrine:migrations:migrate --env={{env}} --no-debug --no-interaction');
9296

9397
})->desc('Migrate database');
9498

0 commit comments

Comments
 (0)