Hello Donovan Bray.

Thank you for your information.

deploy.rb is very usuful. thanks.
and git_clone_or_pull is really good.

* About. after "deploy:update_code", :task1, :task2

  There are problem when I use after "deply:update_code" with
set :deploy_via, :copy

  * It called after archive release files.
  * It called on deployment server

  I would like to execute my task on local server before archive
release files.

Do you have any idea to execute my task on localmachine before archive
release files??

If not, I'll change my mind, I'll download it on deplyment server.

--
Hiroyuki Sato

On 11月3日, 午後12:06, Donovan Bray <donno...@gmail.com> wrote:
> If you are following the standard cap pattern and setting your scm to git 
> then "deploy:update_code" is where capistrano does it's clone business.
>
> You can simply stack after hooks to trigger your own tasks
>
> Ie:
>
> after "deploy:update_code", :task1, :task2
>
> Etc
>
> For pulling down a different repo in an arbitrary task there is an example of 
> that in the utilities helper of cap-recipes. git_clone_or_pull  
> https://github.com/donnoman/cap-recipes/blob/master/lib/cap_recipes/t...
>
> Also im assuming you using 'local destination' because you aren't aware of 
> the actual capistrano variables;
>
> It's generally safest to use latest_release unless you know what the precise 
> differences are.
>
> Many aha moments are contained within this single file:
>
> https://github.com/capistrano/capistrano/blob/master/lib/capistrano/r...
>
> On Nov 2, 2011, at 6:39 AM, hiroysato <hiroys...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Dear members.
>
> > I'm newbie Capistrano.
>
> > I would like to do like the following.
> > Could you tell me how to add my custom task (number 2)??
>
> > * I would like to do like the following.
>
> >  1, fetch main project from g...@git.myserver:main_project.git
> >   to local machine #{local_destination}
> >  2, copy additional files into #{local_destionation}/config/
> > my_config_files.txt
> >    from g...@git.myserver:configirations.git
> >  3, copy it to application server
>
> > * my current deploy.rb
>
> >  set :application, "myapp"
> >  set :repository,  "g...@git.myserver:main_project.git"
> >  set :deploy_via, :copy
>
> >  set :scm, :git
> >  role :web, "webserver"
> >  role :app, "appserver"
> >  role :db,  "dbserver", :primary => true
>
> >  set :deploy_to, "/tmp/hogehoge"
>
> > * my custom task example
>
> >  I would like to hook after fetch main project. like this
>
> >  after "fetch git clone main_project.git" do
> >   Dir.chdir #{local_destination}
>
> >   execute my custom task.
>
> >  end
>
> > Sincerely.
>
> > --
> > Hiroyuki Sato.
>
> > --
> > * 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 
> > athttp://groups.google.com/group/capistrano?hl=en

-- 
* 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

Reply via email to