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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 438af623f1bfbafaeaef34ebd37e966f87a142ce
4
- data.tar.gz: 064091bf7968aea808d4cce27319521e697cecc7
3
+ metadata.gz: 3a81441e1cd095ef7631d1ceec3445b91f55dd19
4
+ data.tar.gz: 653d35f2b7a582b098c6095462655e2080e0cd4c
5
5
  SHA512:
6
- metadata.gz: c8f04011460b4c2b01b0516c5e25c8df0cdc2075bd0702abf37b5115bc1e9db80660e0faa9ecec59cff2249c873cecb5167169c3d2ccce24c7c202df407799dc
7
- data.tar.gz: 4e09dc7110042bd4a3d5a86656a17a653e4dae4935446ab48e69a27b2f29fe0e3d99a1cfe6ebee8beb5c80d4de171c33b41c506238f7d957e6f94d82a499d685
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
- * [![Gem Version](https://badge.fury.io/rb/capistrano-git-copy.png)](http://badge.fury.io/rb/capistrano-git-copy)
39
- * [![Dependencies](https://gemnasium.com/ydkn/capistrano-git-copy.png?travis)](https://gemnasium.com/ydkn/capistrano-git-copy)
40
- * [![PullReview stats](https://www.pullreview.com/github/ydkn/capistrano-git-copy/badges/master.svg?)](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
+ [![Gem Version](https://img.shields.io/gem/v/capistrano-git-copy.svg)](https://rubygems.org/gems/capistrano-git-copy)
48
+ [![Dependencies](https://img.shields.io/gemnasium/ydkn/capistrano-git-copy.svg)](https://gemnasium.com/ydkn/capistrano-git-copy)
49
+ [![Code Climate](https://img.shields.io/codeclimate/github/ydkn/capistrano-git-copy.svg)](https://codeclimate.com/github/ydkn/capistrano-git-copy)
@@ -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 #{fetch(:branch, 'master')} 2>/dev/null`.strip
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 on filesystem)\n"
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 or update repository
83
- if File.exists?(fetch(:local_repo_path))
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 origin/#{fetch(:branch, 'master')} && git submodule init && git submodule update")
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")
@@ -2,7 +2,7 @@ module Capistrano
2
2
  module Git
3
3
  module Copy
4
4
  # gem version
5
- VERSION = '0.6.0'
5
+ VERSION = '0.6.1'
6
6
  end
7
7
  end
8
8
  end
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.0
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: 2014-10-05 00:00:00.000000000 Z
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.2.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