drush-deploy 1.0.12 → 1.0.13.pre20130123003441

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/bin/drush-deploy CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  require 'capistrano/cli'
4
4
  require 'drush_deploy/paths'
5
- module Capistrano
6
- class CLI
7
- alias_method :execute_without_drush, :execute!
8
- def execute_with_drush
9
- options[:recipes] << DrushDeploy::Paths.recipe('bootstrap')
10
- options[:actions] << 'deploy' if options[:actions].empty?
11
- execute_without_drush
12
- end
13
- alias_method :execute!, :execute_with_drush
14
- end
5
+
6
+ aliases,args = ARGV.partition {|a| a =~ /^@./}
7
+
8
+ args = ['--set-before', 'cmdline_target='+aliases.map {|a| a[1..-1] }.join(','),
9
+ '--file', DrushDeploy::Paths.recipe('bootstrap')] + args
10
+
11
+ cli = Capistrano::CLI.parse(args)
12
+ if cli.options[:actions].empty?
13
+ args << 'deploy'
14
+ cli = Capistrano::CLI.parse(args)
15
15
  end
16
- Capistrano::CLI.execute
16
+ cli.execute!
data/drush-deploy.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'drush-deploy'
3
- s.version = '1.0.12'
3
+ s.version = '1.0.13.pre20130123003441'
4
4
  s.summary = "Deployment strategy for Drupal using Drush"
5
5
  s.description = "Utilizes capistrano to allow for doing intellegent deployments of drupal projects."
6
6
  s.authors = ["Matt Edlefsen"]
@@ -75,6 +75,9 @@ module DrushDeploy
75
75
  if site["version_database"]
76
76
  set :version_database, (site["version_database"] == 1)
77
77
  end
78
+ if site["versioned_databases"]
79
+ set :versioned_databases, site["versioned_databases"]
80
+ end
78
81
  end
79
82
  end
80
83
  end
@@ -3,10 +3,7 @@ require 'drush_deploy/database'
3
3
 
4
4
  after "deploy:update_code", "db:drupal:update_settings"
5
5
 
6
- if version_database
7
- after "deploy:update_code", "db:version:create"
8
- before "deploy:rollback", "db:version:rollback"
9
- end
6
+ after "drupal:load_targets", "db:version:init"
10
7
 
11
8
  before "db:version:create", "db:drupal:configure"
12
9
  before "db:version:rollback", "db:drupal:configure"
@@ -68,6 +65,14 @@ namespace :db do
68
65
  end
69
66
 
70
67
  namespace :version do
68
+ task :init do
69
+ if version_database
70
+ after "deploy:update_code", "db:version:create"
71
+ before "deploy:rollback", "db:version:rollback"
72
+ else
73
+ logger.info "Skipping database versioning"
74
+ end
75
+ end
71
76
  desc "Create a versioned backup of the database"
72
77
  task :create, :roles => :web do
73
78
  if releases.size > 1
@@ -22,6 +22,8 @@ set :make_args, ENV['MAKE_ARGS'] if ENV['MAKE_ARGS']
22
22
  set :update_modules, (ENV['UPDATE_MODULES'] =~ true_values) if ENV['UPDATE_MODULES']
23
23
 
24
24
  set :target, ENV['TARGET'] if ENV['TARGET']
25
+ set :target, cmdline_target if exists? :cmdline_target
26
+
25
27
  set :source, ENV['SOURCE'] if ENV['SOURCE']
26
28
 
27
29
  set :application, 'Drupal'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drush-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
5
- prerelease:
4
+ version: 1.0.13.pre20130123003441
5
+ prerelease: 7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matt Edlefsen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-15 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -103,12 +103,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  none: false
105
105
  requirements:
106
- - - ! '>='
106
+ - - ! '>'
107
107
  - !ruby/object:Gem::Version
108
- version: '0'
108
+ version: 1.3.1
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 1.8.24
111
+ rubygems_version: 1.8.23
112
112
  signing_key:
113
113
  specification_version: 3
114
114
  summary: Deployment strategy for Drupal using Drush