capistrano-rsync-bladrak 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/capistrano-rsync-bladrak.gemspec +7 -9
- data/lib/capistrano/rsync.rb +23 -23
- data/lib/capistrano/rsync/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58bbb2c80aa295137c0b5df01b44ef72682f9479
|
4
|
+
data.tar.gz: 0b14c385c515aa954d64b29c21b5a84f6497f0b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 017665cca25fca4deec228ea629a22f8ec2373389e3cbf8a403c6eb827824dc79e00de9335f56c0a6606b70357ef0000b3bb9539f041e26b169874babc8e6da8
|
7
|
+
data.tar.gz: 3658808ece972d5c25ec593ced9a3c08118d85dafa1998a7989a8d6e2bab936f2d1e5cd4ae872851d9b53793c41f02450b9b68530711fdba34b8b81889abeb82
|
@@ -5,22 +5,20 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.version = Capistrano::Rsync::VERSION
|
6
6
|
gem.homepage = "https://github.com/Bladrak/capistrano-rsync"
|
7
7
|
gem.summary = <<-end.strip.gsub(/\s*\n\s*/, " ")
|
8
|
-
|
8
|
+
Increase deployment performance through rsync
|
9
9
|
Capistrano v3 ready!
|
10
|
+
Originally from capistrano-rsync
|
10
11
|
end
|
11
12
|
|
12
13
|
gem.description = <<-end.strip.gsub(/\s*?\n(\n?)\s*/, " \\1\\1")
|
13
|
-
|
14
|
+
This is a rsync 'scm' for Capistrano v3, drastically improving deployment
|
15
|
+
performance, and avoiding you to install git on production servers.
|
14
16
|
|
15
|
-
|
16
|
-
of your development files each time!
|
17
|
-
|
18
|
-
Works with the new Capistrano v3!
|
19
|
-
Suitable for deploying any apps, be it Ruby or Node.js.
|
17
|
+
This was originally a fork of capistrano-rsync.
|
20
18
|
end
|
21
19
|
|
22
|
-
gem.author = "
|
23
|
-
gem.email = "
|
20
|
+
gem.author = "Hugo Briand, Andri Möll"
|
21
|
+
gem.email = "h.briand@gmail.com, andri@dot.ee"
|
24
22
|
gem.license = "LAGPL"
|
25
23
|
|
26
24
|
gem.files = `git ls-files`.split($/)
|
data/lib/capistrano/rsync.rb
CHANGED
@@ -21,7 +21,6 @@ namespace :load do
|
|
21
21
|
set :rsync_cache, "shared/deploy"
|
22
22
|
|
23
23
|
set :rsync_target_dir, ""
|
24
|
-
|
25
24
|
end
|
26
25
|
end
|
27
26
|
|
@@ -43,7 +42,6 @@ rsync_target = lambda do
|
|
43
42
|
end
|
44
43
|
|
45
44
|
Rake::Task["deploy:check"].enhance ["rsync:hook_scm"]
|
46
|
-
# Rake::Task["deploy:updating"].enhance ["rsync:hook_scm"]
|
47
45
|
|
48
46
|
desc "Stage and rsync to the server (or its cache)."
|
49
47
|
task :rsync => %w[rsync:stage] do
|
@@ -60,6 +58,16 @@ task :rsync => %w[rsync:stage] do
|
|
60
58
|
end
|
61
59
|
|
62
60
|
namespace :rsync do
|
61
|
+
desc 'Locally determine the revision that will be deployed'
|
62
|
+
task :set_current_revision do
|
63
|
+
run_locally do
|
64
|
+
within fetch(:rsync_stage) do
|
65
|
+
rev = capture(:git, 'rev-parse', 'HEAD')
|
66
|
+
set :current_revision, rev
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
63
71
|
task :hook_scm do
|
64
72
|
Rake::Task.define_task("#{scm}:check") do
|
65
73
|
invoke "rsync:check"
|
@@ -71,28 +79,24 @@ namespace :rsync do
|
|
71
79
|
end
|
72
80
|
|
73
81
|
task :check do
|
74
|
-
|
82
|
+
next if !fetch(:rsync_cache)
|
83
|
+
|
84
|
+
on release_roles :all do
|
85
|
+
execute :mkdir, '-pv', File.join("#{fetch(:deploy_to)}", "#{fetch(:rsync_cache)}")
|
86
|
+
end
|
75
87
|
end
|
76
88
|
|
77
89
|
task :create_stage do
|
78
90
|
next if File.directory?(fetch(:rsync_stage))
|
79
91
|
|
80
92
|
if fetch(:rsync_sparse_checkout, []).any?
|
81
|
-
|
82
|
-
else
|
83
|
-
invoke "rsync:create_stage:clone"
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
namespace :create_stage do
|
88
|
-
task :sparse do
|
89
|
-
init = %W[git init]
|
93
|
+
init = %W[git init --quiet]
|
90
94
|
init << fetch(:rsync_stage)
|
91
95
|
|
92
96
|
Kernel.system *init
|
93
97
|
|
94
98
|
Dir.chdir fetch(:rsync_stage) do
|
95
|
-
remote = %W[git remote add origin
|
99
|
+
remote = %W[git remote add origin]
|
96
100
|
remote << fetch(:repo_url)
|
97
101
|
Kernel.system *remote
|
98
102
|
|
@@ -108,13 +112,11 @@ namespace :rsync do
|
|
108
112
|
sparse_dir = %W[mkdir .git/info]
|
109
113
|
Kernel.system *sparse_dir
|
110
114
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
Kernel.system *sparse_checkout
|
117
|
-
end
|
115
|
+
open('.git/info/sparse-checkout', 'a') { |f|
|
116
|
+
fetch(:rsync_sparse_checkout).each do |sparse_dir|
|
117
|
+
f.puts sparse_dir
|
118
|
+
end
|
119
|
+
}
|
118
120
|
|
119
121
|
pull = %W[git pull --quiet]
|
120
122
|
if !!fetch(:rsync_depth, false)
|
@@ -124,9 +126,7 @@ namespace :rsync do
|
|
124
126
|
pull << rsync_target.call
|
125
127
|
Kernel.system *pull
|
126
128
|
end
|
127
|
-
|
128
|
-
|
129
|
-
task :clone do
|
129
|
+
else
|
130
130
|
clone = %W[git clone --quiet]
|
131
131
|
clone << fetch(:repo_url, ".")
|
132
132
|
clone << fetch(:rsync_stage)
|
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.1
|
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-02-
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -30,11 +30,10 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '4'
|
33
|
-
description: "
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
email: andri@dot.ee, h.briand@gmail.com
|
33
|
+
description: "This is a rsync 'scm' for Capistrano v3, drastically improving deployment
|
34
|
+
performance, and avoiding you to install git on production servers. \n\nThis was
|
35
|
+
originally a fork of capistrano-rsync."
|
36
|
+
email: h.briand@gmail.com, andri@dot.ee
|
38
37
|
executables: []
|
39
38
|
extensions: []
|
40
39
|
extra_rdoc_files: []
|
@@ -70,5 +69,6 @@ rubyforge_project:
|
|
70
69
|
rubygems_version: 2.4.5
|
71
70
|
signing_key:
|
72
71
|
specification_version: 4
|
73
|
-
summary:
|
72
|
+
summary: Increase deployment performance through rsync Capistrano v3 ready! Originally
|
73
|
+
from capistrano-rsync
|
74
74
|
test_files: []
|