capistrano-rsync-bladrak 1.3.2 → 1.3.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: 5aad8058edbb6d63689d89ba247c46ef40620c1f
4
- data.tar.gz: 91cbb9e32694722e57f15873d962acb11509c08f
3
+ metadata.gz: 6b76adfe7757ac58921b5d2de5d5ba2c00cf2a02
4
+ data.tar.gz: 2e932bb014c955142d65fd4a408861a3819a580c
5
5
  SHA512:
6
- metadata.gz: f512d8a02917dcfa824fa92573adce449de47f85ceffd6d32086641a8e10e4a7ba9dab7d78d2a57483115eabe5a49a58c803ca190953c391ec50d0972230a9b2
7
- data.tar.gz: 7709ba55f56cf97c1046baadd8408826a15e0be330b35a82d829a31f758d942cada45f120a0c25746e11d4f84b434f2edbc7da0c536e11d81189ea4c36e6d614
6
+ metadata.gz: 5b43d974bd1c6904fc95a86d8f1e5263af62a297806c69db873450f552cd99548687e335fc9b9f0864fc36cbc379d03bc15e33d5226bafb63d08ade9004848a8
7
+ data.tar.gz: 9fb48e3646db6c892598f99b332c26029c4382dc662c474fad5f0d0ea0d344e2b75f568334848ff353e2bf476f3c8e71b328c7df0fcc953673d0615f9e2133d0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.3.3 (Jul 15, 2015)
2
+ - Adds support for checking out revisions on top of tags and branches (rsync_checkout_tag is now deprecated)
3
+
1
4
  ## 1.3.0 (Jul 2, 2015)
2
5
  - Refactored library to use run_locally and execute from Capistrano, so the output is uniformized & we exit on failed commands
3
6
  - Added some options as well (see README.md for complete list)
data/README.md CHANGED
@@ -131,7 +131,8 @@ rsync_cache | `shared/deploy` | Path where to cache your repository on the ser
131
131
  rsync_options | `[]` | Array of options to pass to `rsync`.
132
132
  rsync_sparse_checkout | `[]` | Array of directories to checkout (checks out all if empty)
133
133
  rsync_depth | `1` | Sets the --depth argument value for the git operations; this is set to 1 by default as you won't need the git history
134
- rsync_checkout_tag | `false` | Is the ``:branch`` symbol containing a branch or a tag?
134
+ rsync_checkout | `branch` | Is the ``:branch`` symbol containing a branch, tag or revision?
135
+ rsync_checkout_tag | `false` | Is the ``:branch`` symbol containing a branch or a tag? ``Deprecated``
135
136
  rsync_copy | `rsync --archive --acls --xattrs` | The command used to copy from remote cache to remote release
136
137
  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
138
  enable_git_submodules | `false` | Should we fetch submodules as well?
@@ -8,9 +8,17 @@ set_if_empty :rsync_copy, "rsync --archive --acls --xattrs"
8
8
  # Sparse checkout allows to checkout only part of the repository
9
9
  set_if_empty :rsync_sparse_checkout, []
10
10
 
11
- # Sparse checkout allows to checkout only part of the repository
11
+ # Merely here for backward compatibility reasons
12
12
  set_if_empty :rsync_checkout_tag, false
13
13
 
14
+ # Option states what to checkout
15
+ set_if_empty :rsync_checkout, "branch"
16
+
17
+ # To be somewhat backward compatible to the previous checkout_tag option
18
+ if fetch(:rsync_checkout_tag, false)
19
+ set :rsync_checkout, "tag"
20
+ end
21
+
14
22
  # You may not need the whole history, put to false to get it whole
15
23
  set_if_empty :rsync_depth, 1
16
24
 
@@ -40,12 +48,24 @@ rsync_cache = lambda do
40
48
  end
41
49
 
42
50
  rsync_target = lambda do
43
- target = !!fetch(:rsync_checkout_tag, false) ? "tags/#{fetch(:branch)}" : "origin/#{fetch(:branch)}"
51
+ case fetch(:rsync_checkout)
52
+ when "tag"
53
+ target = "tags/#{fetch(:branch)}"
54
+ when "revision"
55
+ target = fetch(:branch)
56
+ else
57
+ target = "origin/#{fetch(:branch)}"
58
+ end
44
59
  target
45
60
  end
46
61
 
47
62
  rsync_branch = lambda do
48
- branch = !!fetch(:rsync_checkout_tag, false) ? "tags/#{fetch(:branch)}" : fetch(:branch)
63
+ if fetch(:rsync_checkout) == "tag"
64
+ branch = "tags/#{fetch(:branch)}"
65
+ else
66
+ branch = fetch(:branch)
67
+ end
68
+
49
69
  branch
50
70
  end
51
71
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Rsync
3
- VERSION = "1.3.2"
3
+ VERSION = "1.3.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.3.2
4
+ version: 1.3.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-07-08 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano