Skip to content

Commit

Permalink
Changed the symfony recipe, so that it supports the new (v3) dir stru…
Browse files Browse the repository at this point in the history
…cture.
  • Loading branch information
ZeeCoder committed May 19, 2015
1 parent 067bbe5 commit a33e23d
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 a33e23d

Please sign in to comment.