Method: CachedDeploy#callback

Defined in:
lib/chef-deploy/cached_deploy.rb

#callback(what) ⇒ Object

before_symlink before_restart



52
53
54
55
56
57
58
59
# File 'lib/chef-deploy/cached_deploy.rb', line 52

def callback(what)
  if File.exist?("#{latest_release}/deploy/#{what}.rb")
    Dir.chdir(latest_release) do
      Chef::Log.info "running deploy hook: #{latest_release}/deploy/#{what}.rb"
      instance_eval(IO.read("#{latest_release}/deploy/#{what}.rb"))
    end
  end
end