Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded calls to "on" when calling symfony command #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions lib/capistrano/tasks/symfony.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ namespace :symfony do
role = args[:role] || fetch(:symfony_roles)
params = args[:params] || ''

on release_roles(role) do
within release_path do
symfony_console(command, params)
end
within release_path do
symfony_console(command, params)
end

Rake::Task[t.name].reenable
Expand All @@ -21,26 +19,20 @@ namespace :symfony do
namespace :cache do
desc "Run app/console cache:clear for the #{fetch(:symfony_env)} environment"
task :clear do
on release_roles(fetch(:symfony_deploy_roles)) do
symfony_console "cache:clear"
end
symfony_console "cache:clear"
end

desc "Run app/console cache:warmup for the #{fetch(:symfony_env)} environment"
task :warmup do
on release_roles(fetch(:symfony_deploy_roles)) do
symfony_console "cache:warmup"
end
symfony_console "cache:warmup"
end
end

namespace :assets do
desc "Install assets"
task :install do
on release_roles(fetch(:symfony_deploy_roles)) do
within release_path do
symfony_console "assets:install", fetch(:assets_install_path) + ' ' + fetch(:assets_install_flags)
end
within release_path do
symfony_console "assets:install", fetch(:assets_install_path) + ' ' + fetch(:assets_install_flags)
end
end
end
Expand Down