10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/r10k/cli/synchronize.rb', line 10
def self.command
@cmd ||= Cri::Command.define do
name 'synchronize'
usage 'synchronize <options>'
summary 'Fully synchronize all environments'
run do |opts, args, cmd|
deployment = R10K::Deployment.instance
environments = deployment.environments
directories = (deployment.config[:purgedirs] || [])
stack = Middleware::Builder.new do
environments.each do |env|
use R10K::Action::Environment::Deploy, env
end
directories.each do |dir|
use R10K::Action::Environment::Purge, dir
end
end
stack_env = {
:update_cache => true,
:trace => opts[:trace],
:recurse => true,
}
stack.call(stack_env)
end
end
end
|