capistrano-rsync-bladrak 1.3.1 → 1.3.2
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.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/capistrano/rsync.rb +12 -3
- 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: 5aad8058edbb6d63689d89ba247c46ef40620c1f
|
4
|
+
data.tar.gz: 91cbb9e32694722e57f15873d962acb11509c08f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f512d8a02917dcfa824fa92573adce449de47f85ceffd6d32086641a8e10e4a7ba9dab7d78d2a57483115eabe5a49a58c803ca190953c391ec50d0972230a9b2
|
7
|
+
data.tar.gz: 7709ba55f56cf97c1046baadd8408826a15e0be330b35a82d829a31f758d942cada45f120a0c25746e11d4f84b434f2edbc7da0c536e11d81189ea4c36e6d614
|
data/README.md
CHANGED
@@ -49,7 +49,7 @@ Set rsync as the SCM to use
|
|
49
49
|
set :scm, :rsync
|
50
50
|
```
|
51
51
|
|
52
|
-
|
52
|
+
Optionally set some `rsync_options` to your liking:
|
53
53
|
```ruby
|
54
54
|
set :rsync_options, %w[--recursive --delete --delete-excluded --exclude .git*]
|
55
55
|
```
|
@@ -135,6 +135,7 @@ rsync_checkout_tag | `false` | Is the ``:branch`` symbol containing a branch or
|
|
135
135
|
rsync_copy | `rsync --archive --acls --xattrs` | The command used to copy from remote cache to remote release
|
136
136
|
rsync_target_dir | `.` | The local directory within ``:rsync_stage`` to clone to & deploy (useful if you want to keep cache of several branches/tags for instance)
|
137
137
|
enable_git_submodules | `false` | Should we fetch submodules as well?
|
138
|
+
reset_git_submodules_before_update | `false` | Do a reset hard on submodules (in case you do modifications on working copies)?
|
138
139
|
|
139
140
|
|
140
141
|
License
|
data/lib/capistrano/rsync.rb
CHANGED
@@ -26,6 +26,8 @@ set_if_empty :rsync_target_dir, "."
|
|
26
26
|
|
27
27
|
set_if_empty :enable_git_submodules, false
|
28
28
|
|
29
|
+
set_if_empty :reset_git_submodules_before_update, false
|
30
|
+
|
29
31
|
# NOTE: Please don't depend on tasks without a description (`desc`) as they
|
30
32
|
# might change between minor or patch version releases. They make up the
|
31
33
|
# private API and internals of Capistrano::Rsync. If you think something should
|
@@ -158,12 +160,19 @@ namespace :rsync do
|
|
158
160
|
|
159
161
|
run_locally do
|
160
162
|
within fetch(:rsync_stage) do
|
161
|
-
|
162
|
-
|
163
|
+
execute :git, :fetch, '--quiet --all --prune', "#{git_depth.call}"
|
164
|
+
|
165
|
+
if !!fetch(:rsync_checkout_tag, false)
|
166
|
+
execute :git, :fetch, '--quiet --tags'
|
167
|
+
end
|
163
168
|
|
164
169
|
execute :git, :reset, '--quiet', '--hard', "#{rsync_target.call}"
|
165
170
|
|
166
171
|
if fetch(:enable_git_submodules)
|
172
|
+
if fetch(:reset_git_submodules_before_update)
|
173
|
+
execute :git, :submodule, :foreach, "git reset --hard HEAD"
|
174
|
+
end
|
175
|
+
|
167
176
|
execute :git, :submodule, :update
|
168
177
|
end
|
169
178
|
end
|
@@ -180,7 +189,7 @@ namespace :rsync do
|
|
180
189
|
next if !has_roles?
|
181
190
|
|
182
191
|
copy = %(#{fetch(:rsync_copy)} "#{rsync_cache.call}/" "#{release_path}/")
|
183
|
-
on
|
192
|
+
on release_roles(:all) do |host|
|
184
193
|
execute copy
|
185
194
|
end
|
186
195
|
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.3.
|
4
|
+
version: 1.3.2
|
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-07-
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|