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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efdf0954c09848c97c6233be699529ead9bff3ca
4
- data.tar.gz: 61aad85bfcf9d29573b7e00fb3f8e174849c35e7
3
+ metadata.gz: 5aad8058edbb6d63689d89ba247c46ef40620c1f
4
+ data.tar.gz: 91cbb9e32694722e57f15873d962acb11509c08f
5
5
  SHA512:
6
- metadata.gz: 3ec33760e1b9a51505275ee9ce74a2c9904ccf794d3d54f74d41c29eb0a0f5a8d499e32b8eba5f150bdbfea63757b9d2ef5431a65ac7752642664fee94378fba
7
- data.tar.gz: fb4277c381c4d877ab57ed0aa62af842564339559c03b4c2e7690f5ce3f0d38aa2afb432fe166186dac16b08c1984e1f28d6a83a815f097f452f387d9586fc87
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
- Set some `rsync_options` to your liking:
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
@@ -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
- tags = !!fetch(:rsync_checkout_tag, false) ? '--tags' : ''
162
- execute :git, :fetch, '--quiet --all --prune', "#{tags}", "#{git_depth.call}"
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 roles(:all) do |host|
192
+ on release_roles(:all) do |host|
184
193
  execute copy
185
194
  end
186
195
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Rsync
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
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.3.1
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-03 00:00:00.000000000 Z
11
+ date: 2015-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano