capistrano-cul 0.0.13 → 0.0.14
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/capistrano/tasks/wp/migrate.cap +13 -24
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ba8aa2d215d9e7bd5a08cf20c9d2cc4b68612ca
|
4
|
+
data.tar.gz: b3991585daed81c5bab294d5ba67bb277730a5db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b37fd6d3e4b6d71304f91629dfc1cd55bb34d5ee20b9e4df95331c645fe9d07335537d117850c395cf89840b49572a4897ef6347a8fe0b214bdea5f839cd3f2
|
7
|
+
data.tar.gz: d1406e40206bb9701a53cd9df10134b291a626abdc8acd6ed6c079c1942ccf2ebdb7c087c817d29e5af55db3321bdebf695ddc421d658ce0766a9d388c281439
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.14
|
@@ -50,14 +50,6 @@ namespace :cul do
|
|
50
50
|
failure = true
|
51
51
|
end
|
52
52
|
end
|
53
|
-
within fetch(:wp_docroot) do
|
54
|
-
# Ensure that destination WordPress is running the latest version
|
55
|
-
result = capture :wp, (fetch(:multisite, false) ? "--url=#{fetch(:destination_site_multisite_url)}" : ''), 'core', 'check-update'
|
56
|
-
unless result.index('Success')
|
57
|
-
puts "Could not copy TO destination [#{fetch(:stage)}] WordPress because it is not running the latest version of WordPress. Please update [#{fetch(:stage)}] before running a copy operation."
|
58
|
-
failure = true
|
59
|
-
end
|
60
|
-
end
|
61
53
|
end
|
62
54
|
next if failure # End if the previous checks failed
|
63
55
|
|
@@ -96,7 +88,7 @@ namespace :cul do
|
|
96
88
|
execute :find, find_upload_dirs, ' >> ', path_to_list_of_files_to_copy
|
97
89
|
|
98
90
|
# Print out which files won't be copied
|
99
|
-
files_not_copied = capture(:comm, '-23', "<(find . -type f -path './uploads/*' -o -path './blogs.dir/*' | sort)", "<(find #{find_upload_dirs} | sort)")
|
91
|
+
files_not_copied = capture(:comm, '-23', "<(find . -type f \\( -path './uploads/*' -o -path './blogs.dir/*' \\) | sort)", "<(find #{find_upload_dirs} | sort)")
|
100
92
|
|
101
93
|
puts (
|
102
94
|
"The following files will not be copied:\n" +
|
@@ -179,8 +171,6 @@ namespace :cul do
|
|
179
171
|
else
|
180
172
|
puts '- Skipping search and replace because neither "y" nor "yes" were entered.'
|
181
173
|
end
|
182
|
-
|
183
|
-
puts "\nCopy operation complete!"
|
184
174
|
end
|
185
175
|
|
186
176
|
# Next, install all plugins and themes from src wordpress, matching all versions and active vs. inactive plugin and theme states
|
@@ -196,40 +186,39 @@ namespace :cul do
|
|
196
186
|
|
197
187
|
# Within dest wp instance, install specifically versioned plugins and themes
|
198
188
|
within File.join(fetch(:wp_docroot)) do
|
199
|
-
# Get list of
|
200
|
-
|
201
|
-
|
189
|
+
# Get list of repo-managed plugins and themes so that we don't attempt to overwrite these directories
|
190
|
+
repo_managed_plugin_names = fetch(:wp_custom_plugins, {}).keys
|
191
|
+
repo_managed_theme_names = fetch(:wp_custom_themes, {}).keys
|
202
192
|
|
203
|
-
puts
|
204
|
-
puts 'Already installed themes: ' + already_installed_theme_names.inspect
|
193
|
+
puts "Downloading new copies of non-repo-managed plugins and themes..."
|
205
194
|
|
206
|
-
data_for_plugins.delete_if{|plugin_info|
|
195
|
+
data_for_plugins.delete_if{|plugin_info| repo_managed_plugin_names.include?(plugin_info['name']) }.each do |plugin_info|
|
207
196
|
name = plugin_info['name']
|
208
197
|
version = plugin_info['version']
|
209
198
|
status = plugin_info['status']
|
210
199
|
|
211
200
|
case status
|
212
201
|
when 'active'
|
213
|
-
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:
|
202
|
+
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:destination_site_multisite_url)}" : ''), 'plugin', 'install', name, "--version=#{version}", '--activate'
|
214
203
|
when 'active-network'
|
215
|
-
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:
|
204
|
+
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:destination_site_multisite_url)}" : ''), 'plugin', 'install', name, "--version=#{version}", '--activate-network'
|
216
205
|
when 'inactive'
|
217
|
-
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:
|
206
|
+
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:destination_site_multisite_url)}" : ''), 'plugin', 'install', name, "--version=#{version}"
|
218
207
|
when 'must-use'
|
219
208
|
puts "--- WARNING: must-use plugin #{name} was not migrated over. It should be put in your blog's repository and deployed through a regular deployment."
|
220
209
|
end
|
221
210
|
end
|
222
211
|
|
223
|
-
data_for_themes.delete_if{|theme_info|
|
212
|
+
data_for_themes.delete_if{|theme_info| repo_managed_theme_names.include?(theme_info['name']) }.each do |theme_info|
|
224
213
|
name = theme_info['name']
|
225
214
|
version = theme_info['version']
|
226
215
|
status = theme_info['status']
|
227
216
|
|
228
217
|
case status
|
229
218
|
when 'active'
|
230
|
-
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:
|
231
|
-
when 'inactive'
|
232
|
-
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:
|
219
|
+
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:destination_site_multisite_url)}" : ''), 'theme', 'install', name, "--version=#{version}", '--activate'
|
220
|
+
when 'inactive', 'parent'
|
221
|
+
execute :wp, (fetch(:multisite, false) ? "--url=#{fetch(:destination_site_multisite_url)}" : ''), 'theme', 'install', name, "--version=#{version}"
|
233
222
|
end
|
234
223
|
end
|
235
224
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-cul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carla Galarza
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-02-
|
12
|
+
date: 2018-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|