From a33e23dd6d863e2768337cf2260cba104069dab6 Mon Sep 17 00:00:00 2001 From: Hubert Viktor Date: Tue, 19 May 2015 09:57:17 +0200 Subject: [PATCH] Changed the symfony recipe, so that it supports the new (v3) dir structure. --- recipe/symfony.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/recipe/symfony.php b/recipe/symfony.php index 702b15e2..208da67e 100644 --- a/recipe/symfony.php +++ b/recipe/symfony.php @@ -30,13 +30,17 @@ set('auto_migrate', false); env('env_vars', 'SYMFONY_ENV=prod'); env('env', 'prod'); +// Adding support for the Symfony3 directory structure +set('bin_dir', 'app'); +set('var_dir', 'app'); + /** * Create cache dir */ task('deploy:create_cache_dir', function () { // Set cache dir - env('cache_dir', '{{release_path}}/app/cache'); + env('cache_dir', '{{release_path}}/' . trim(get('var_dir'), '/') . '/cache'); // Remove cache dir if it exist run('if [ -d "{{cache_dir}}" ]; then rm -rf {{cache_dir}}; fi'); @@ -68,7 +72,7 @@ task('deploy:assets', function () { */ task('deploy:assetic:dump', function () { - run("php {{release_path}}/app/console assetic:dump --env={{env}} --no-debug"); + run('php {{release_path}}/' . trim(get('bin_dir'), '/') . '/console assetic:dump --env={{env}} --no-debug'); })->desc('Dump assets'); @@ -78,7 +82,7 @@ task('deploy:assetic:dump', function () { */ task('deploy:cache:warmup', function () { - run('php {{release_path}}/app/console cache:warmup --env={{env}} --no-debug'); + run('php {{release_path}}/' . trim(get('bin_dir'), '/') . '/console cache:warmup --env={{env}} --no-debug'); })->desc('Warm up cache'); @@ -88,7 +92,7 @@ task('deploy:cache:warmup', function () { */ task('database:migrate', function () { - run("php {{release_path}}/app/console doctrine:migrations:migrate --env={{env}} --no-debug --no-interaction"); + run('php {{release_path}}/' . trim(get('bin_dir'), '/') . '/console doctrine:migrations:migrate --env={{env}} --no-debug --no-interaction'); })->desc('Migrate database');