capistrano-pending 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/capistrano/pending.rb +1 -0
- data/lib/capistrano/pending/scm/svn.rb +21 -0
- data/lib/capistrano/pending/tasks/pending.rake +14 -9
- data/lib/capistrano/pending/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c19dcb4e7a3fd64e3c8c1deda687b7e8a364fb4
|
4
|
+
data.tar.gz: 05061b119ad4664ae816b8f84608008efe745a4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6eb2fed6edc8afa0f8488ee767d1099a663a3ec28b280e93217902a9586eada6abaab2ca7c4149829ef63d0905bebc5a12e6e54596ec9ea863ac5bcb78e8f43
|
7
|
+
data.tar.gz: 6379ff457d421d7e216b5606bb0fad89a677a6f1e0190d3ece285f51111b0e02d02ad457ca11cdc5c5d8c730310f6349ee9353311c39bf7bcddc44e25e428922
|
data/README.md
CHANGED
data/lib/capistrano/pending.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
require "capistrano/pending/scm/base"
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Pending
|
5
|
+
module SCM
|
6
|
+
class Svn < Base
|
7
|
+
command :svn
|
8
|
+
|
9
|
+
def log(from, to)
|
10
|
+
to = :HEAD if to == :master
|
11
|
+
svn :log, "-r#{from}:#{to}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def diff(from, to)
|
15
|
+
to = :HEAD if to == :master
|
16
|
+
svn :diff, "-r#{from}:#{to}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -5,13 +5,7 @@ namespace :deploy do
|
|
5
5
|
of the changes that have occurred since the last deploy. Note that this \
|
6
6
|
might not be supported on all SCM's
|
7
7
|
DESC
|
8
|
-
task :pending
|
9
|
-
on roles fetch(:capistrano_pending_role, :db) do |host|
|
10
|
-
if test "[ -f #{current_path}/REVISION ]"
|
11
|
-
invoke "deploy:pending:log"
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
8
|
+
task :pending => "deploy:pending:log"
|
15
9
|
|
16
10
|
namespace :pending do
|
17
11
|
def _scm
|
@@ -26,6 +20,15 @@ namespace :deploy do
|
|
26
20
|
_scm.diff(from, to)
|
27
21
|
end
|
28
22
|
|
23
|
+
def _ensure_revision
|
24
|
+
if test "[ -f #{current_path}/REVISION ]"
|
25
|
+
yield
|
26
|
+
else
|
27
|
+
error "REVISION file doesn't exist"
|
28
|
+
exit 1
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
29
32
|
task :log => :setup do
|
30
33
|
_log(fetch(:revision), fetch(:branch))
|
31
34
|
end
|
@@ -43,8 +46,10 @@ namespace :deploy do
|
|
43
46
|
|
44
47
|
task :capture_revision do
|
45
48
|
on roles fetch(:capistrano_pending_role, :db) do |host|
|
46
|
-
|
47
|
-
|
49
|
+
_ensure_revision do
|
50
|
+
within current_path do
|
51
|
+
set :revision, capture(:cat, "REVISION")
|
52
|
+
end
|
48
53
|
end
|
49
54
|
end
|
50
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-pending
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masato Ikeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/capistrano/pending.rb
|
71
71
|
- lib/capistrano/pending/scm/base.rb
|
72
72
|
- lib/capistrano/pending/scm/git.rb
|
73
|
+
- lib/capistrano/pending/scm/svn.rb
|
73
74
|
- lib/capistrano/pending/tasks/pending.rake
|
74
75
|
- lib/capistrano/pending/version.rb
|
75
76
|
homepage: https://github.com/a2ikm/capistrano-pending
|
@@ -92,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
93
|
version: '0'
|
93
94
|
requirements: []
|
94
95
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.4.5
|
96
97
|
signing_key:
|
97
98
|
specification_version: 4
|
98
99
|
summary: Provide deploy:pending task to Capistrano 3.
|