capistrano-ash 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.17
1
+ 0.0.18
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{capistrano-ash}
8
- s.version = "0.0.17"
8
+ s.version = "0.0.18"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["August Ash"]
@@ -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
  # --------------------------------------------
@@ -10,7 +10,7 @@ configuration.load do
10
10
  # --------------------------------------------
11
11
  # Setting defaults
12
12
  # --------------------------------------------
13
- set :uploads_dir, "wp-content/uploads"
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}/#{uploads_dir}"
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}/#{uploads_dir}"
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 17
9
- version: 0.0.17
8
+ - 18
9
+ version: 0.0.18
10
10
  platform: ruby
11
11
  authors:
12
12
  - August Ash