capistrano-rsync-bladrak 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1728cf780b7be3ef038aecdcde18074a5b70042
4
- data.tar.gz: 0c62a1dd2cc2a6f478aa419d7c27f54cdd1940e8
3
+ metadata.gz: 4706159e43001095d6752db3b7bb4252b40b7b5b
4
+ data.tar.gz: 626de244a1bec9cda1401c4fd00d551ac5057152
5
5
  SHA512:
6
- metadata.gz: 85309a1ca9c4200f5fddd97ad0e0cf06e3db623c94ad3d749995453328b95d6c36841c94c62df3012ad40bc5736557fab68470202722f6a4dbd2f2af9e7d2faa
7
- data.tar.gz: 7922f6143588c59e27d4a455f7a7d5d723ac0fe68a5d3cd0e99b19a813d8ebd79b9a3f28cc6e22145cec18508aa33cea8dedd4ed7a996cae2f2e471360534b84
6
+ metadata.gz: 7167b260d9e60cf9f9cdfafceaf80a0a98d5c5f47f6c81451f54ce1fd5aa43e36dcf77d8679725aa48ecb91bdb1078dcde2aea192623738530a71b71f1bf1336
7
+ data.tar.gz: 82e1caa5f22e9985fceee2c0a6e9362f3ef600ee114cb8f53b61a1e124a7d150cb39f89d75654ec9ff2c7b99fa49021dafa5c60124eec701158f239ebbb25518
data/Makefile CHANGED
@@ -6,7 +6,7 @@ love:
6
6
  pack:
7
7
  gem build $(NAME).gemspec
8
8
 
9
- publish:
9
+ publish: pack
10
10
  gem push $(NAME)-*.gem
11
11
 
12
12
  clean:
@@ -45,7 +45,7 @@ Rake::Task["deploy:check"].enhance ["rsync:hook_scm"]
45
45
 
46
46
  desc "Stage and rsync to the server (or its cache)."
47
47
  task :rsync => %w[rsync:stage] do
48
- roles(:all).each do |role|
48
+ on release_roles(:all) do |role|
49
49
  user = role.user + "@" if !role.user.nil?
50
50
 
51
51
  rsync = %w[rsync]
@@ -58,8 +58,15 @@ task :rsync => %w[rsync:stage] do
58
58
  end
59
59
 
60
60
  namespace :rsync do
61
+
62
+ def has_roles?
63
+ return env.filter(release_roles(:all)).any?
64
+ end
65
+
61
66
  desc 'Locally determine the revision that will be deployed'
62
67
  task :set_current_revision do
68
+ next if !has_roles?
69
+
63
70
  run_locally do
64
71
  within fetch(:rsync_stage) do
65
72
  rev = capture(:git, 'rev-parse', 'HEAD').strip!
@@ -80,6 +87,7 @@ namespace :rsync do
80
87
 
81
88
  task :check do
82
89
  next if !fetch(:rsync_cache)
90
+ next if !has_roles?
83
91
 
84
92
  on release_roles :all do
85
93
  execute :mkdir, '-pv', File.join("#{fetch(:deploy_to)}", "#{fetch(:rsync_cache)}")
@@ -88,6 +96,7 @@ namespace :rsync do
88
96
 
89
97
  task :create_stage do
90
98
  next if File.directory?(fetch(:rsync_stage))
99
+ next if !has_roles?
91
100
 
92
101
  if fetch(:rsync_sparse_checkout, []).any?
93
102
  init = %W[git init --quiet]
@@ -139,6 +148,8 @@ namespace :rsync do
139
148
 
140
149
  desc "Stage the repository in a local directory."
141
150
  task :stage => %w[create_stage] do
151
+ next if !has_roles?
152
+
142
153
  Dir.chdir fetch(:rsync_stage) do
143
154
  update = %W[git fetch --quiet --all --prune]
144
155
  if !!fetch(:rsync_depth, false)
@@ -155,6 +166,7 @@ namespace :rsync do
155
166
  task :release => %w[rsync] do
156
167
  # Skip copying if we've already synced straight to the release directory.
157
168
  next if !fetch(:rsync_cache)
169
+ next if !has_roles?
158
170
 
159
171
  copy = %(#{fetch(:rsync_copy)} "#{rsync_cache.call}/" "#{release_path}/")
160
172
  on roles(:all).each do execute copy end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Rsync
3
- VERSION = "1.2.2"
3
+ VERSION = "1.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-rsync-bladrak
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Briand, Andri Möll
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-23 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano