Skip to content

Commit

Permalink
Merge pull request #262 from ZeeCoder/feature/sf3-dir-structure
Browse files Browse the repository at this point in the history
Changed the symfony recipe to support the v3 dir structure
  • Loading branch information
Anton Medvedev committed May 19, 2015
2 parents 92b3637 + a33e23d commit 1821119
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions recipe/symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@
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');
Expand Down Expand Up @@ -68,7 +72,7 @@
*/
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');

Expand All @@ -78,7 +82,7 @@
*/
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');

Expand All @@ -88,7 +92,7 @@
*/
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');

Expand Down

0 comments on commit 1821119

Please sign in to comment.