capistrano-rsync-bladrak 1.3.3 → 1.3.4
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/CHANGELOG.md +3 -0
- data/README.md +1 -0
- data/lib/capistrano/rsync/version.rb +1 -1
- data/lib/capistrano/rsync.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7d0e6576ffd0c42450f61b717ca16cc03bd00e1
|
4
|
+
data.tar.gz: 34281d0804487afc761111293b598957d48e1300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c7622fb4e4e560acf09671027c78e456cd6221d7b4f261d4a0e2625c4305aa52f9261172baacf1ee42a44d47c4cdce200502e5d14aa92c9fb37ff139bf03e5a
|
7
|
+
data.tar.gz: 2e1fc380a4185a584a37ffebdf8be847e43c5c0e04ec91902b496d9c88be68ba3832aa4a0eac38b99247e060308624523c7c4e3fd31a7dace36504bf23d8d604
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -126,6 +126,7 @@ Name | Default | Description
|
|
126
126
|
--------------|---------|------------
|
127
127
|
repo_url | `.` | The path or URL to a Git repository to clone from.
|
128
128
|
branch | `master` | The Git branch to checkout.
|
129
|
+
git_remote | ``origin`` | The remote to use for Git checkout.
|
129
130
|
rsync_stage | `tmp/deploy` | Path where to clone your repository for staging, checkouting and rsyncing. Can be both relative or absolute.
|
130
131
|
rsync_cache | `shared/deploy` | Path where to cache your repository on the server to avoid rsyncing from scratch each time. Can be both relative or absolute.<br> Set to `nil` if you want to disable the cache.
|
131
132
|
rsync_options | `[]` | Array of options to pass to `rsync`.
|
data/lib/capistrano/rsync.rb
CHANGED
@@ -32,6 +32,9 @@ set_if_empty :rsync_cache, "shared/deploy"
|
|
32
32
|
|
33
33
|
set_if_empty :rsync_target_dir, "."
|
34
34
|
|
35
|
+
# Creates opportunity to define remote other than origin
|
36
|
+
set_if_empty :git_remote, "origin"
|
37
|
+
|
35
38
|
set_if_empty :enable_git_submodules, false
|
36
39
|
|
37
40
|
set_if_empty :reset_git_submodules_before_update, false
|
@@ -50,18 +53,18 @@ end
|
|
50
53
|
rsync_target = lambda do
|
51
54
|
case fetch(:rsync_checkout)
|
52
55
|
when "tag"
|
53
|
-
target = "tags/#{fetch(:branch)}"
|
56
|
+
target = "#{fetch(:git_remote)}/tags/#{fetch(:branch)}"
|
54
57
|
when "revision"
|
55
58
|
target = fetch(:branch)
|
56
59
|
else
|
57
|
-
target = "
|
60
|
+
target = "#{fetch(:git_remote)}/#{fetch(:branch)}"
|
58
61
|
end
|
59
62
|
target
|
60
63
|
end
|
61
64
|
|
62
65
|
rsync_branch = lambda do
|
63
66
|
if fetch(:rsync_checkout) == "tag"
|
64
|
-
branch = "tags/#{fetch(:branch)}"
|
67
|
+
branch = "#{fetch(:git_remote)}/tags/#{fetch(:branch)}"
|
65
68
|
else
|
66
69
|
branch = fetch(:branch)
|
67
70
|
end
|