capistrano-git-copy 0.6.0 → 0.6.1
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/README.md +7 -6
- data/capistrano-git-copy.gemspec +1 -1
- data/lib/capistrano/git/copy/tasks/deploy.cap +8 -7
- data/lib/capistrano/git/copy/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a81441e1cd095ef7631d1ceec3445b91f55dd19
|
4
|
+
data.tar.gz: 653d35f2b7a582b098c6095462655e2080e0cd4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da22afa01251756988b217715a3192d401d763d7fd420476ee82ba50158844728c0c68c42b98a22d612d141668240f187590538d8eb5cd7e8df6d05521761100
|
7
|
+
data.tar.gz: 124699224d4743a83c7918bc35354cf4a6a25656f029de6682f65092ce2464b7e3c340261ae96560fae8541525a7616530d6667a039ac938a6625a3fc3c74ffa
|
data/README.md
CHANGED
@@ -33,12 +33,6 @@ You can modify any of the following Capistrano variables in your `deploy.rb` con
|
|
33
33
|
|
34
34
|
* Uses [git-archive-all](https://github.com/Kentzo/git-archive-all) for bundling repositories.
|
35
35
|
|
36
|
-
## Code status
|
37
|
-
|
38
|
-
* [](http://badge.fury.io/rb/capistrano-git-copy)
|
39
|
-
* [](https://gemnasium.com/ydkn/capistrano-git-copy)
|
40
|
-
* [](https://www.pullreview.com/github/ydkn/capistrano-git-copy/reviews/master)
|
41
|
-
|
42
36
|
## Contributing
|
43
37
|
|
44
38
|
1. Fork it
|
@@ -46,3 +40,10 @@ You can modify any of the following Capistrano variables in your `deploy.rb` con
|
|
46
40
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
47
41
|
4. Push to the branch (`git push origin my-new-feature`)
|
48
42
|
5. Create new Pull Request
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
[](https://rubygems.org/gems/capistrano-git-copy)
|
48
|
+
[](https://gemnasium.com/ydkn/capistrano-git-copy)
|
49
|
+
[](https://codeclimate.com/github/ydkn/capistrano-git-copy)
|
data/capistrano-git-copy.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'capistrano', '>= 3.1.0'
|
21
|
+
spec.add_dependency 'capistrano', '>= 3.1.0', '< 4.0.0'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
24
|
spec.add_development_dependency 'rake'
|
@@ -47,7 +47,7 @@ namespace :git_copy do
|
|
47
47
|
|
48
48
|
desc 'Determine the revision that will be deployed'
|
49
49
|
task set_current_revision: :'git_copy:wrapper' do
|
50
|
-
revision = `cd #{fetch(:local_repo_path)} && git rev-parse --short
|
50
|
+
revision = `cd #{fetch(:local_repo_path)} && git rev-parse --short HEAD 2>/dev/null`.strip
|
51
51
|
|
52
52
|
on release_roles :all do
|
53
53
|
set :current_revision, revision
|
@@ -62,7 +62,7 @@ namespace :git_copy do
|
|
62
62
|
system("rm -rf #{tmp_path}")
|
63
63
|
print "Removed #{tmp_path}\n"
|
64
64
|
else
|
65
|
-
print "Nothing to cleanup (#{tmp_path} not found
|
65
|
+
print "Nothing to cleanup (#{tmp_path} not found)\n"
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -79,15 +79,16 @@ namespace :git_copy do
|
|
79
79
|
# prepare temp directory
|
80
80
|
system("mkdir -p #{tmp_path}")
|
81
81
|
|
82
|
-
# clone
|
83
|
-
|
84
|
-
system("cd #{fetch(:local_repo_path)} && git fetch origin")
|
85
|
-
else
|
82
|
+
# clone repository if necessary
|
83
|
+
unless File.exists?(fetch(:local_repo_path))
|
86
84
|
system("git clone #{fetch(:repo_url)} #{fetch(:local_repo_path)}")
|
87
85
|
end
|
88
86
|
|
87
|
+
# update repository
|
88
|
+
system("cd #{fetch(:local_repo_path)} && git fetch origin && git fetch origin --tags")
|
89
|
+
|
89
90
|
# reset repository
|
90
|
-
system("cd #{fetch(:local_repo_path)} && git reset --hard
|
91
|
+
system("cd #{fetch(:local_repo_path)} && git reset --hard #{fetch(:branch, 'master')} 2>/dev/null")
|
91
92
|
|
92
93
|
# init and update submodules
|
93
94
|
system("cd #{fetch(:local_repo_path)} && git submodule init && git submodule update")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-git-copy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Schwab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.1.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.0.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 3.1.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.0.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
112
|
version: '0'
|
107
113
|
requirements: []
|
108
114
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.4.5
|
110
116
|
signing_key:
|
111
117
|
specification_version: 4
|
112
118
|
summary: Copy local git repository deploy strategy for capistrano
|