有没有办法为capistrano制作自定义部署策略,但无需将其捆绑为gem?我搜索过并搜索过,但每个人的例子都被打包成宝石。
我只想把它放在包含路径中并在Capfile中要求它。
答案 0 :(得分:1)
这样的事情应该有效:
require 'capistrano/recipes/deploy/strategy/remote_cache'
class InsaneStrategy < Capistrano::Deploy::Strategy::RemoteCache
def copy_repository_cache
do_something()
end
end
set :strategy, InsaneStrategy.new(self)