capistrano-cul 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/VERSION +1 -1
- data/lib/capistrano/tasks/wp.cap +22 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0143c8d36da076a4fff5fe65da655f52a66c9f00
|
4
|
+
data.tar.gz: 605697273391a1ce2ab01af9db1104043eb2dcac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70c576dbcea722dfb80564788f34235a492e95870d85b79e412ddcce32d02ce12259bca90792032d5d449e91b56c00612be426084020ac8c2e7abb9c877a8179
|
7
|
+
data.tar.gz: f974464b50c4ede35881436643b2dcbcab4799dc41fba7d155609dcc01159c9d526729d64011ab4699c25c7f435d2dc6b78afeafca1d7f23ecf4a43d7f67f630
|
data/README.md
CHANGED
@@ -57,16 +57,19 @@ require 'capistrano/cul/wp'
|
|
57
57
|
3. `cap {env} cul:wp:symlink_custom_plugins_and_themes`
|
58
58
|
|
59
59
|
Creates symlinks for custom plugins and themes as part of a WordPress deployment. Generally run as an `after :deploy` hook.
|
60
|
-
4. `cap {env} cul:wp:
|
60
|
+
4. `cap {env} cul:wp:searchreplace`
|
61
|
+
|
62
|
+
Runs a search and replace operation on the tables in a WordPress installation.
|
63
|
+
5. `cap {env} cul:wp:update:core`
|
61
64
|
|
62
65
|
Updates WordPress core to the latest version.
|
63
|
-
|
66
|
+
6. `cap {env} cul:wp:update:plugins`
|
64
67
|
|
65
68
|
Updates non-repo-managed plugins to the latest version.
|
66
|
-
|
69
|
+
7. `cap {env} cul:wp:update:themes`
|
67
70
|
|
68
71
|
Updates non-repo-managed themes to the latest version.
|
69
|
-
|
72
|
+
8. `cap {env} cul:wp:update:all`
|
70
73
|
|
71
74
|
Updates WordPress core, plugins, and themes (in that order) by calling update:core, update:plugins and update:themes tasks.
|
72
75
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/capistrano/tasks/wp.cap
CHANGED
@@ -85,7 +85,7 @@ namespace :cul do
|
|
85
85
|
task :install do
|
86
86
|
puts "Please provide administrative credentials:"
|
87
87
|
ask(:admin_user, "Admin username:")
|
88
|
-
ask(:admin_password, "Admin password:")
|
88
|
+
ask(:admin_password, "Admin password:", echo: false)
|
89
89
|
ask(:admin_email, "Admin email:")
|
90
90
|
|
91
91
|
require_cap_params!([:url, :title, :admin_user, :admin_password, :admin_email])
|
@@ -144,5 +144,26 @@ namespace :cul do
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
end
|
147
|
+
|
148
|
+
desc "Runs a search and replace operation on the tables in a WordPress installation"
|
149
|
+
task :searchreplace do
|
150
|
+
on roles(:web) do
|
151
|
+
within fetch(:wp_docroot) do
|
152
|
+
set :search_string, ask("search string")
|
153
|
+
set :replacement_string, ask("replacement string")
|
154
|
+
puts "Are you sure you want to replace all occurrences of \"#{fetch(:search_string)}\" with \"#{fetch(:replacement_string)}\"?"
|
155
|
+
set :confirm, ask('"y" or "yes" to continue')
|
156
|
+
if fetch(:confirm) == 'y' || fetch(:confirm) == 'yes'
|
157
|
+
puts 'Running search and replace. This may take a while for large databases...'
|
158
|
+
start_time = Time.now
|
159
|
+
#execute :wp, 'search-replace', "'#{search_string}'", "'#{replacement_string}'", '--skip-columns=guid'
|
160
|
+
execute :wp, 'search-replace', "'#{fetch(:search_string)}'", "'#{fetch(:replacement_string)}'", '--skip-columns=guid'
|
161
|
+
puts "Search and replace complete (took #{(Time.now - start_time).to_s} seconds)"
|
162
|
+
else
|
163
|
+
puts 'Search and replace operation has been cancelled because "y" or "yes" were not entered.'
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
147
168
|
end
|
148
169
|
end
|