Skip to content

Commit

Permalink
Merge pull request #20 from capistrano/set-symfony-env
Browse files Browse the repository at this point in the history
Ensure user-land configured symfony-env is used in console task
  • Loading branch information
peterjmit committed Jul 29, 2014
2 parents bf16643 + 5c12145 commit 9cfe20c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/capistrano/symfony/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,3 @@

# Assetic dump flags
set :assetic_dump_flags, ''

fetch(:default_env).merge!(symfony_env: fetch(:symfony_env))
9 changes: 9 additions & 0 deletions lib/capistrano/tasks/set_symfony_env.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace :deploy do
task :set_symfony_env do
fetch(:default_env).merge!(symfony_env: fetch(:symfony_env) || 'prod')
end
end

Capistrano::DSL.stages.each do |stage|
after stage, 'deploy:set_symfony_env'
end
2 changes: 2 additions & 0 deletions lib/capistrano/tasks/symfony.rake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load File.expand_path("../set_symfony_env.rake", __FILE__)

namespace :symfony do
desc "Execute a provided symfony command"
task :console, :command, :params, :role do |t, args|
Expand Down

0 comments on commit 9cfe20c

Please sign in to comment.