Created
June 30, 2011 19:07
-
-
Save dje/1056943 to your computer and use it in GitHub Desktop.
chef deploy resource activate workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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