cap-git-deploy 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +15 -2
- data/Gemfile +3 -3
- data/LICENSE.txt +22 -0
- data/README.md +9 -1
- data/Rakefile +1 -0
- data/cap-git-deploy.gemspec +21 -21
- data/lib/cap-git-deploy/version.rb +2 -2
- data/lib/cap-git-deploy.rb +2 -2
- data/lib/recipes/fast-git-deploy.rb +3 -1
- data/lib/recipes/git-revisioning.rb +5 -2
- metadata +29 -4
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# Specify your gem's dependencies in
|
4
|
-
gemspec
|
3
|
+
# Specify your gem's dependencies in cap-git-deploy.gemspec
|
4
|
+
gemspec
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Nicola Racco
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -61,4 +61,12 @@ To setup your environment, when your recipes are ready, type the following comma
|
|
61
61
|
cap deploy:setup
|
62
62
|
```
|
63
63
|
|
64
|
-
This will setup your git repository on the remote host.
|
64
|
+
This will setup your git repository on the remote host.
|
65
|
+
|
66
|
+
## Other Stuff: Logs
|
67
|
+
|
68
|
+
Tail the current environment log with the "logs" task. So the following command will do a "tail -F" on "log/beta.log"
|
69
|
+
|
70
|
+
```bash
|
71
|
+
cap beta logs
|
72
|
+
````
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/cap-git-deploy.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cap-git-deploy/version'
|
4
5
|
|
5
|
-
Gem::Specification.new do |
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = 'cap-git-deploy'
|
8
|
+
gem.version = Cap::Git::Deploy::VERSION
|
9
|
+
gem.authors = ['Nicola Racco', 'Elia Schito']
|
10
|
+
gem.email = ['nicola@mikamai.com']
|
11
|
+
gem.description = %q{Mikamai-style deploy strategy}
|
12
|
+
gem.summary = %q{Mikamai-style deploy strategy}
|
13
|
+
gem.homepage = "http://www.mikamai.com"
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
20
|
+
gem.add_runtime_dependency 'capistrano'
|
21
|
+
gem.add_runtime_dependency 'grit'
|
22
|
+
|
23
|
+
gem.add_development_dependency 'rake'
|
24
|
+
end
|
data/lib/cap-git-deploy.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'capistrano'
|
2
|
-
require
|
2
|
+
require 'cap-git-deploy/version'
|
3
3
|
|
4
4
|
require 'grit'
|
5
5
|
require 'etc'
|
@@ -30,4 +30,4 @@ if Capistrano::Configuration.instance
|
|
30
30
|
Dir.glob(File.join(File.dirname(__FILE__), '/recipes/*.rb')).sort.each do |f|
|
31
31
|
Capistrano::Configuration.instance.load f
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
@@ -63,6 +63,8 @@ namespace :deploy do
|
|
63
63
|
|
64
64
|
run "cd #{current_path} && git fetch" unless rolling_back
|
65
65
|
run "cd #{current_path} && git reset --hard #{branch_name}"
|
66
|
+
|
67
|
+
finalize_update
|
66
68
|
end
|
67
69
|
|
68
70
|
task :insert_tag, :except => { :no_release => true } do
|
@@ -74,4 +76,4 @@ end
|
|
74
76
|
# launch bundle:install after update task if it's detected
|
75
77
|
# because it will not run with his standard behavior (before deploy:finalize_update)
|
76
78
|
# as we are using this custom git-style deployment procedure
|
77
|
-
after 'deploy:update', 'bundle:install' if find_task 'bundle:install'
|
79
|
+
after 'deploy:update', 'bundle:install' if find_task 'bundle:install'
|
@@ -1,5 +1,8 @@
|
|
1
|
+
set :current_revision do
|
2
|
+
capture("head -1 #{current_path}/REVISION", :except => { :no_release => true }).chomp
|
3
|
+
end
|
4
|
+
|
1
5
|
set :revision_file, 'REVISION'
|
2
|
-
set(:current_revision) { capture("head -1 #{current_path}/REVISION", :except => { :no_release => true }).chomp }
|
3
6
|
|
4
7
|
namespace :revision do
|
5
8
|
desc "Create a REVISION file containing the SHA of the deployed commit"
|
@@ -30,4 +33,4 @@ namespace :revision do
|
|
30
33
|
end
|
31
34
|
end
|
32
35
|
|
33
|
-
after 'deploy:update', 'revision:set'
|
36
|
+
after 'deploy:update', 'revision:set'
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap-git-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- Nicola Racco
|
9
|
+
- Elia Schito
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
13
|
+
date: 2013-01-15 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: capistrano
|
@@ -43,16 +44,34 @@ dependencies:
|
|
43
44
|
- - ! '>='
|
44
45
|
- !ruby/object:Gem::Version
|
45
46
|
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
46
63
|
description: Mikamai-style deploy strategy
|
47
64
|
email:
|
48
|
-
-
|
65
|
+
- nicola@mikamai.com
|
49
66
|
executables: []
|
50
67
|
extensions: []
|
51
68
|
extra_rdoc_files: []
|
52
69
|
files:
|
53
70
|
- .gitignore
|
54
71
|
- Gemfile
|
72
|
+
- LICENSE.txt
|
55
73
|
- README.md
|
74
|
+
- Rakefile
|
56
75
|
- cap-git-deploy.gemspec
|
57
76
|
- lib/cap-git-deploy.rb
|
58
77
|
- lib/cap-git-deploy/version.rb
|
@@ -71,12 +90,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
90
|
- - ! '>='
|
72
91
|
- !ruby/object:Gem::Version
|
73
92
|
version: '0'
|
93
|
+
segments:
|
94
|
+
- 0
|
95
|
+
hash: -3349321138983095283
|
74
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
97
|
none: false
|
76
98
|
requirements:
|
77
99
|
- - ! '>='
|
78
100
|
- !ruby/object:Gem::Version
|
79
101
|
version: '0'
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
hash: -3349321138983095283
|
80
105
|
requirements: []
|
81
106
|
rubyforge_project:
|
82
107
|
rubygems_version: 1.8.24
|