capistrano-wpcli 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/lib/capistrano/tasks/wpdb.rake +8 -8
- data/lib/capistrano/wpcli/version.rb +1 -1
- metadata +1 -1
@@ -10,10 +10,10 @@ namespace :load do
|
|
10
10
|
|
11
11
|
# A local temp dir which is read and writeable
|
12
12
|
set :local_tmp_dir, "/tmp"
|
13
|
-
|
13
|
+
|
14
14
|
# Temporal db dumps path
|
15
|
-
set :wpcli_remote_db_file, "#{fetch(:tmp_dir)}/wpcli_database.sql"
|
16
|
-
set :wpcli_local_db_file, "#{fetch(:local_tmp_dir)}/wpcli_database.sql"
|
15
|
+
set :wpcli_remote_db_file, "#{fetch(:tmp_dir)}/wpcli_database.sql.gz"
|
16
|
+
set :wpcli_local_db_file, "#{fetch(:local_tmp_dir)}/wpcli_database.sql.gz"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -23,13 +23,13 @@ namespace :wpcli do
|
|
23
23
|
task :pull do
|
24
24
|
on roles(:web) do
|
25
25
|
within release_path do
|
26
|
-
execute :wp, :db, :export, fetch(:wpcli_remote_db_file)
|
26
|
+
execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_remote_db_file)
|
27
27
|
download! fetch(:wpcli_remote_db_file), fetch(:wpcli_local_db_file)
|
28
28
|
execute :rm, fetch(:wpcli_remote_db_file)
|
29
29
|
end
|
30
30
|
|
31
31
|
run_locally do
|
32
|
-
execute :wp, :db, :import,
|
32
|
+
execute :gunzip, "<", fetch(:wpcli_local_db_file), "|", :wp, :db, :import, "-"
|
33
33
|
execute :rm, fetch(:wpcli_local_db_file)
|
34
34
|
execute :wp, "search-replace", fetch(:wpcli_remote_url), fetch(:wpcli_local_url), fetch(:wpcli_args) || "--skip-columns=guid"
|
35
35
|
end
|
@@ -40,7 +40,7 @@ namespace :wpcli do
|
|
40
40
|
task :push do
|
41
41
|
on roles(:web) do
|
42
42
|
run_locally do
|
43
|
-
execute :wp, :db, :export, fetch(:wpcli_local_db_file)
|
43
|
+
execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_local_db_file)
|
44
44
|
end
|
45
45
|
|
46
46
|
upload! fetch(:wpcli_local_db_file), fetch(:wpcli_remote_db_file)
|
@@ -50,11 +50,11 @@ namespace :wpcli do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
within release_path do
|
53
|
-
execute :wp, :db, :import,
|
53
|
+
execute :gunzip, "<", fetch(:wpcli_remote_db_file), "|", :wp, :db, :import, "-"
|
54
54
|
execute :rm, fetch(:wpcli_remote_db_file)
|
55
55
|
execute :wp, "search-replace", fetch(:wpcli_local_url), fetch(:wpcli_remote_url), fetch(:wpcli_args) || "--skip-columns=guid"
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
60
|
-
end
|
60
|
+
end
|