Deploying without SVN
|
|
Administrator: (2008-07-19) Step 2 has been updated for compatibility with the new morph_deploy.rb. MAP currently expects your application to be stored in SVN. If by any chance you want to deploy a locally stored Rails project:
NOTE: You’ll have to replace ‘cp -R’ if you’re not working on a *nix-based OS. |
|
|
Thanks for the great tip! Coming soon is support for all scm backends supported by capistrano 2.x. Currently: svn, cvs, git, mercurial, accurev, bazaar, perforce and darcs. The script will still default to svn, but can be changed exactly the same way a regular deploy script is, b modifying the set :scm line and other relevant scm entries. It can also be set from the command line with the cap -s options when calling the script. Here are a few examples for deploying using different scms from a local repository: git: cap -f morph_deploy.rb -s scm=git -s deploy_via=checkout morph:deploy bazzar: cap -f morph_deploy.rb -s scm=bzr -s repository=’’ morph:deploy mercurial: cap -f morph_deploy.rb -s scm=mercurial -s deploy_via=checkout -s repository=. morph:deploy Hope this comes in handy. Guy. |
|
|
In addition to the above, current capistrano code in svn (not yet released) has an scm called none that does a copy just like mikong suggested. When that is released (or if you are brave and uses capistrano from svn) you could call it as: cap -f morph_deploy.rb -s scm=none -s repository=. morph:deploy Guy. |
|
|
I found another way to do SCM-less app deployment, for *nix: instead of using cp(1) for copying the application tree, use tar(1) with its piping feature:
This nicely avoids the infinite recursion caused by the morph_tmp_dir inside the application tree, and also allows the morph_deploy.rb script to be in the application root directory as well.
|
|
|
For Windows users, see this thread. |