capistrano-wordpress 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/capistrano-wordpress.gemspec +1 -1
- data/lib/capistrano_wordpress.rb +17 -25
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/lib/capistrano_wordpress.rb
CHANGED
@@ -42,24 +42,23 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
42
42
|
_cset(:domain) { abort "Please specify your domain name for deployment: set :domain, 'yourdomain.com'" }
|
43
43
|
|
44
44
|
# Application/Theme details
|
45
|
-
|
45
|
+
set :application, domain
|
46
46
|
_cset (:theme_name) { abort "Please specify a theme name (no spaces, please): set :theme_name, 'themename'" }
|
47
|
-
|
48
|
-
|
49
|
-
# SCM settings
|
50
|
-
set :appdir,
|
51
|
-
set :scm,
|
52
|
-
set :scm_verbose,
|
53
|
-
set :local_repository,
|
54
|
-
set :repository,
|
55
|
-
set :branch,
|
56
|
-
|
57
|
-
set :
|
58
|
-
set :
|
59
|
-
set :
|
60
|
-
set :
|
61
|
-
set :
|
62
|
-
set :keep_releases, 100
|
47
|
+
set :current_dir, theme_name
|
48
|
+
|
49
|
+
# SCM settings
|
50
|
+
set :appdir, "/home/#{user}/deployments/#{application}"
|
51
|
+
set :scm, 'git'
|
52
|
+
set :scm_verbose, true
|
53
|
+
set :local_repository, "ssh://#{user}@#{domain}/~/git/#{application}.git"
|
54
|
+
set :repository, "/home/#{user}/git/#{application}.git"
|
55
|
+
set :branch, 'master'
|
56
|
+
set :git_shallow_clone, 1
|
57
|
+
set :deploy_to, "/home/#{user}/#{domain}/wp-content/themes/"
|
58
|
+
set :releases_path, "/home/#{user}/cap/#{domain}/releases/"
|
59
|
+
set :shared_path, "/home/#{user}/cap/#{domain}/shared/"
|
60
|
+
set :use_sudo, false
|
61
|
+
set :keep_releases, 100
|
63
62
|
|
64
63
|
# Git settings for capistrano
|
65
64
|
default_run_options[:pty] = true # needed for git password prompts
|
@@ -71,13 +70,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
71
70
|
|
72
71
|
namespace :deploy do
|
73
72
|
|
74
|
-
# Remove normal "rails" tasks; not needed for WP
|
75
|
-
# [:setup, :update, :update_code, :finalize_update, :symlink, :restart].each do |default_task|
|
76
|
-
# task default_task do
|
77
|
-
# # ... ahh, silence!
|
78
|
-
# end
|
79
|
-
# end
|
80
|
-
|
81
73
|
desc "A macro-task that updates the code and fixes the symlink."
|
82
74
|
task :default do
|
83
75
|
transaction do
|
@@ -94,7 +86,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
94
86
|
desc "Remove the WordPress cache and killall php5 instances"
|
95
87
|
task :after_deploy do
|
96
88
|
cleanup
|
97
|
-
run "rm -rf
|
89
|
+
run "rm -rf /home/#{user}/#{domain}/wp-content/cache/"
|
98
90
|
run "killall php5.cgi"
|
99
91
|
run "killall php5.cgi"
|
100
92
|
run "killall php5.cgi"
|