rails - capistrano deployment of a subdirectory
I have a directory structure in git/github which looks like:
开发者_开发知识库 demoapp
- mockups
- some_files
- app (rails app)
the github url for the app looks like git@github/user/demoapp.git
Currently when I use capistrano to deploy, it looks for rake file in the directory demoapp and fails to find it.
How do I specify in capistrano deploy.rb the directory of my app (which is one level down).
thanks
After looking through Deploying a Git subdirectory in Capistrano
I ended up creating a separate repositories for my rails app and for other stuff. The rails repository has all the artifacts like rake required by the capistrano script.
if you can't split the repo, the only way is add extra cap callback
after "deploy:update_code", "deploy:copy_to_level_up"
namespace :deploy do
desc "Copy code application to level up"
task :copy_to_level_up do
run "mv -R #{release_path}/ ....." #rewrite it with your conditions
end
end
精彩评论