Looks like your mixing cap2 and cap3 syntax.  In cap3 you use `execute` to 
run system commands -- see the commented example for restarting in your 
post.

I am not sure, but it looks like the second argument is a symbol, the name 
of the system command (e.g. `:touch` or `:ln`) and the 3rd and subsequent 
(comma-separated) arguments are parameters to the system command.

Also, look at the pattern in the restart command, where there's a kind of 
loop that runs over each server in the cluster for given roles (even if you 
have only one, plan ahead!) -- `on roles(:web) ... do`.

Hope this is a) correct, and b) helpful :-)

Tom

On Friday, November 22, 2013 7:37:31 AM UTC-5, bsod99 wrote:
>
> I have a couple of basic symlinks commands I want to run during 
> deployment, and am not sure best way to do it capistrano 3. This is what I 
> have at the moment, but it's not executing the custom_symlink task as "run" 
> is no longer available as a method. Any help appreciated!
>
> namespace :deploy do
>
>   desc 'Restart application'
>   task :restart do
>     on roles(:app), in: :sequence, wait: 5 do
>       # Your restart mechanism here, for example:
>       # execute :touch, release_path.join('tmp/restart.txt')
>     end
>   end
>
>   desc 'Custom symlink task'
>   task :custom_symlink do
>     run "ln -s #{release_path}/wp-content/themes/mytheme 
> #{shared_path}/wp-content/themes/mytheme"
>   end
>
>   after :restart, :clear_cache do
>     on roles(:web), in: :groups, limit: 3, wait: 10 do
>       # Here we can do anything such as:
>       # within release_path do
>       #   execute :rake, 'cache:clear'
>       # end
>     end
>   end
>   after :finishing, 'custom_symlink'
>   after :finishing, 'deploy:cleanup'
>
> end
>

-- 
-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to