Class: Vx::Builder::ScriptBuilder::Deploy

Inherits:
Base
  • Object
show all
Defined in:
lib/vx/builder/script_builder/deploy.rb

Instance Attribute Summary

Attributes inherited from Base

#app

Instance Method Summary collapse

Methods inherited from Base

#deploy?, #do_after_deploy, #do_announce, #do_before_deploy, #do_before_install, #do_before_script, #do_cache_key, #do_cached_directories, #do_deploy_script, #do_init, #do_install, #do_script

Methods included from Helper::VxvmInstall

#vxvm_install

Methods included from Helper::TraceShCommand

#trace_sh_command

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/vx/builder/script_builder/deploy.rb', line 7

def call(env)
  do_before_deploy(env) do |e|
    env.source.before_deploy.each do |c|
      e << trace_sh_command(c)
    end
  end

  do_deploy_script(env) do |e|
    env.source.deploy_modules.each do |m|
      m.to_commands.each do |c|
        e << trace_sh_command(c)
      end
    end
  end

  do_after_deploy(env) do |e|
    env.source.after_deploy.each do |c|
      e << trace_sh_command(c)
    end
  end

  app.call(env)
end