Skip to content

Instantly share code, notes, and snippets.

@dje
Created June 30, 2011 19:07
Show Gist options
  • Select an option

  • Save dje/1056943 to your computer and use it in GitHub Desktop.

Select an option

Save dje/1056943 to your computer and use it in GitHub Desktop.
chef deploy resource activate workaround
deploy_resource = deploy_revision "/var/www" do
[..snip..]
end
ruby_block "activate deploy" do
block do
Dir.chdir("/var/www/shared/cached-copy")
activated = File.basename( File.readlink( "/var/www/current" )) ==
`git rev-parse HEAD`.strip
if !activated
deploy_resource.run_action( :force_deploy )
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment