1

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

truthSeekr
  • 1,603
  • 4
  • 25
  • 44
  • possible duplicate of [Deploying a Git subdirectory in Capistrano](http://stackoverflow.com/questions/29168/deploying-a-git-subdirectory-in-capistrano) – Thilo Nov 04 '12 at 13:13
  • See :repo_tree instructions in the [update of this q](http://stackoverflow.com/questions/29168/deploying-a-git-subdirectory-in-capistrano). – Jorge Orpinel Pérez Sep 23 '15 at 06:10

2 Answers2

1

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.

Community
  • 1
  • 1
truthSeekr
  • 1,603
  • 4
  • 25
  • 44
1

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
Anatoly
  • 15,298
  • 5
  • 53
  • 77