public
Description: Automate your wordpress deploys with capistrano and git
Homepage: http://www.jestro.com
Clone URL: git://github.com/jestro/wordpress-capistrano.git
update capistrano
jnewland (author)
Mon Nov 17 17:44:49 -0800 2008
commit  641bba56b726079f702c59978be38ec5cea651bb
tree    3fcf259eb9e0cd3c4076c3ad5fb27f318f5fb376
parent  1bc8d51b8e29bdce7a13b20e1f5810410dfe034a
...
1
2
 
3
4
5
...
22
23
24
 
 
25
26
27
28
 
 
 
29
30
31
32
33
34
 
 
 
 
 
 
 
 
 
 
 
35
36
...
1
 
2
3
4
5
...
22
23
24
25
26
27
 
 
 
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
0
@@ -1,5 +1,5 @@
0
 #the domain name for the server you'll be running wordpress on
0
-set :server, "localhost"
0
+set :domain, "localhost"
0
 
0
 #the name of this wordpress project
0
 set :application, "wordpress-capistrano-test"
0
@@ -22,14 +22,27 @@ set :git_enable_submodules, 1
0
 
0
 #allow deploys w/o having git installed locally
0
 set(:real_revision) { capture("git ls-remote #{repository} #{branch} | cut -f 1") }
0
+#no need for system, log, and pids directory
0
+set :shared_children, %w()
0
 
0
-role :app, server
0
-role :web, server
0
-role :db,  server, :primary => true
0
+role :app, domain
0
+role :web, domain
0
+role :db,  domain, :primary => true
0
 
0
 namespace :deploy do
0
   desc "Override deploy restart to not do anything"
0
   task :restart do
0
     #
0
   end
0
+end
0
+
0
+task :finalize_update, :except => { :no_release => true } do
0
+  run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
0
+  #link the themes, plugins, and config
0
+  run <<-CMD
0
+    rm -rf #{latest_release}/wordpress/wp-content/themes #{latest_release}/wordpress/wp-content/plugins &&
0
+    ln -s #{latest_release}/themes #{latest_release}/wordpress/wp-content/themes &&
0
+    ln -s #{latest_release}/plugins #{latest_release}/wordpress/wp-content/plugins &&
0
+    ln -s #{latest_release}/config/wp-config.php #{latest_release}/wordpress/wp-config.php
0
+  CMD
0
 end
0
\ No newline at end of file

Comments