Answer the question
In order to leave comments, you need to log in
How to get rid of dependence on filenames when deploying via capistrano?
There are a bunch of tasks in the /lib/capistrano/tasks folder.
For example, there are two files there:
db.rake and nginx.rake
db is located alphabetically higher than nginx
Now if I write in db.rake:
...
before :reset, 'nginx:stop'
after :reset, 'nginx:start'
...
Dir.glob('lib/capistrano/tasks/*.rb').each { |r| import r }
require 'nginx'
require 'lib/capistrano/tasks/nginx'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question