Sorry, have just found "sh" to run my server command - is this the right 
way to go about my task though, adding this custom task to the deploy.rb as 
per the code posted?

On Friday, 22 November 2013 13:37:31 UTC+1, 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