capistrano-ash 0.0.17 → 0.0.18
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-ash.gemspec +1 -1
- data/lib/ash/drupal.rb +13 -0
- data/lib/ash/wordpress.rb +3 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.18
|
data/capistrano-ash.gemspec
CHANGED
data/lib/ash/drupal.rb
CHANGED
@@ -69,6 +69,19 @@ namespace :deploy do
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
+
namespace :backup do
|
73
|
+
desc "Perform a backup of database files"
|
74
|
+
task :db, :roles => :db do
|
75
|
+
puts "Backing up the database now and putting dump file in the previous release directory"
|
76
|
+
multisites.each_pair do |folder, url|
|
77
|
+
# define the filename (include the current_path so the dump file will be within the dirrectory)
|
78
|
+
filename = "#{current_path}/#{folder}_dump-#{Time.now.to_s.gsub(/ /, "_")}.sql.gz"
|
79
|
+
# dump the database for the proper environment
|
80
|
+
run "#{drush_bin} -l #{url} -r #{current_path} sql-dump | gzip -c --best > #{filename}"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
72
85
|
# --------------------------------------------
|
73
86
|
# Drupal-specific methods
|
74
87
|
# --------------------------------------------
|
data/lib/ash/wordpress.rb
CHANGED
@@ -10,7 +10,7 @@ configuration.load do
|
|
10
10
|
# --------------------------------------------
|
11
11
|
# Setting defaults
|
12
12
|
# --------------------------------------------
|
13
|
-
set :
|
13
|
+
set :uploads_path, "wp-content/uploads"
|
14
14
|
|
15
15
|
# --------------------------------------------
|
16
16
|
# Calling our Methods
|
@@ -41,7 +41,7 @@ namespace :deploy do
|
|
41
41
|
desc "[internal] Touches up the released code. This is called by update_code after the basic deploy finishes."
|
42
42
|
task :finalize_update, :except => { :no_release => true } do
|
43
43
|
# remove shared directories
|
44
|
-
run "rm -Rf #{latest_release}/#{
|
44
|
+
run "rm -Rf #{latest_release}/#{uploads_path}"
|
45
45
|
run "rm -Rf #{latest_release}/wp-content/cache"
|
46
46
|
# Removing cruft files.
|
47
47
|
run "rm -Rf #{latest_release}/license.txt"
|
@@ -55,7 +55,7 @@ end
|
|
55
55
|
namespace :wordpress do
|
56
56
|
desc "Links the correct settings file"
|
57
57
|
task :symlink do
|
58
|
-
run "ln -nfs #{shared_path}/uploads #{current_release}/#{
|
58
|
+
run "ln -nfs #{shared_path}/uploads #{current_release}/#{uploads_path}"
|
59
59
|
run "ln -nfs #{shared_path}/cache #{current_release}/wp-content/cache"
|
60
60
|
run "ln -nfs #{latest_release}/wp-config.php.#{stage} #{latest_release}/wp-config.php"
|
61
61
|
end
|