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 +4 -4
- data/Makefile +1 -1
- data/lib/capistrano/rsync.rb +13 -1
- data/lib/capistrano/rsync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4706159e43001095d6752db3b7bb4252b40b7b5b
|
4
|
+
data.tar.gz: 626de244a1bec9cda1401c4fd00d551ac5057152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7167b260d9e60cf9f9cdfafceaf80a0a98d5c5f47f6c81451f54ce1fd5aa43e36dcf77d8679725aa48ecb91bdb1078dcde2aea192623738530a71b71f1bf1336
|
7
|
+
data.tar.gz: 82e1caa5f22e9985fceee2c0a6e9362f3ef600ee114cb8f53b61a1e124a7d150cb39f89d75654ec9ff2c7b99fa49021dafa5c60124eec701158f239ebbb25518
|
data/Makefile
CHANGED
data/lib/capistrano/rsync.rb
CHANGED
@@ -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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|