capistrano-cul 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/capistrano/tasks/wp/migrate.cap +23 -5
- 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: 8a0e53d0b3eedd681257e528aebf115a1970ac10
|
4
|
+
data.tar.gz: 7768d92de643aa8f389f88e9083967d7862cea3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e6c6c71b3b07cbc76c8b0c24c27bb3f2fe72a73c39571ccb4243e3f9dbcf4d4db6ab692d8cd716f73e68a62abd399bd6a1b6d5b34476ff1092cdcfee5e62971
|
7
|
+
data.tar.gz: 6db4f2a1ccc30f3f92d55ee7d51d4f940d4ccd15d02bd7aa446b623c953d8ccc308da45a981410e4e2043a594806321fd5b2620c8ce3ba2b1e5320323d86cf2f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.17
|
@@ -34,10 +34,11 @@ namespace :cul do
|
|
34
34
|
next
|
35
35
|
end
|
36
36
|
|
37
|
+
# Don't really care about maintenance mode because we're completely destroying the target environment
|
37
38
|
# Enter maintenance mode
|
38
|
-
invoke 'cul:wp:enable_maintenance_mode'
|
39
|
+
#invoke 'cul:wp:enable_maintenance_mode'
|
39
40
|
|
40
|
-
# Check WP version on source
|
41
|
+
# Check WP version on source WordPress instance
|
41
42
|
failure = false
|
42
43
|
on roles(:web) do
|
43
44
|
within fetch(:src_wp_docroot) do
|
@@ -51,6 +52,15 @@ namespace :cul do
|
|
51
52
|
end
|
52
53
|
next if failure # End if the previous checks failed
|
53
54
|
|
55
|
+
on roles(:web) do
|
56
|
+
# Destroy current wp_docroot
|
57
|
+
execute :rm, '-rf', fetch(:wp_docroot)
|
58
|
+
execute :mkdir, fetch(:wp_docroot)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Download new copy of wordpress
|
62
|
+
invoke 'cul:wp:setup'
|
63
|
+
|
54
64
|
path_to_list_of_files_to_copy = ''
|
55
65
|
|
56
66
|
on roles(:web) do
|
@@ -62,6 +72,9 @@ namespace :cul do
|
|
62
72
|
# 2. Everything under uploads AND wpblogs.dir with
|
63
73
|
# cul-allowed-upload-types file extension filter applied
|
64
74
|
|
75
|
+
# Make sure find command handles non-ASCII chars
|
76
|
+
#execute 'LC_ALL=en_US.iso885915'
|
77
|
+
|
65
78
|
# Generate two find commands for the above searches
|
66
79
|
find_non_upload_dirs = '. -type f ' +
|
67
80
|
# EXCLUDE plugins, themes, mu-plugins, uploads, and blogs.dir
|
@@ -117,8 +130,13 @@ namespace :cul do
|
|
117
130
|
|
118
131
|
# we're only copying files from the given file list
|
119
132
|
rsync_params << "--files-from=#{path_to_list_of_files_to_copy}"
|
133
|
+
|
134
|
+
src_wp_content_dir = File.join(fetch(:src_wp_docroot), 'wp-content/')
|
135
|
+
# Run a find operation on the wp-content dir to pre-cache all non-UTF compliant files prior to our rsync operation (to handle files with smart quotes, em dashes, foreign characters, etc.)
|
136
|
+
execute :find, src_wp_content_dir, '-print0', '|', 'perl', '-n0e', '\'chomp; print $_, "\n" if /[[:^ascii:][:cntrl:]]/\''
|
137
|
+
|
120
138
|
# src directory (--files-from values are relative to this src directory)
|
121
|
-
rsync_params <<
|
139
|
+
rsync_params << src_wp_content_dir
|
122
140
|
# dest directory
|
123
141
|
rsync_params << fetch(:wp_content_path) + '/'
|
124
142
|
|
@@ -136,7 +154,7 @@ namespace :cul do
|
|
136
154
|
|
137
155
|
within fetch(:wp_docroot) do
|
138
156
|
# Regenerate symlinks
|
139
|
-
invoke 'cul:wp:symlink_custom_plugins_and_themes'
|
157
|
+
invoke! 'cul:wp:symlink_custom_plugins_and_themes'
|
140
158
|
end
|
141
159
|
|
142
160
|
# Now it's time to copy the database
|
@@ -239,7 +257,7 @@ namespace :cul do
|
|
239
257
|
end
|
240
258
|
end
|
241
259
|
|
242
|
-
after 'cul:wp:migrate:copy_from', 'cul:wp:disable_maintenance_mode'
|
260
|
+
#after 'cul:wp:migrate:copy_from', 'cul:wp:disable_maintenance_mode'
|
243
261
|
|
244
262
|
end
|
245
263
|
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.17
|
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-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|