capistrano-git-copy 0.3.0 → 0.4.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94972a5b5759dadb2f2ebf2e41d36803676830f4
|
4
|
+
data.tar.gz: f790c70439a4c18692d666148bf243da068bbe0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2f15230b238f8fce7ed92857ecaecc88df80f00d93a487905942792556c242d8f53cee21c2210c080472c280bd16e4f1524d5540940705683030774ebb5b9b1
|
7
|
+
data.tar.gz: 411ef9a081b6479098a5246a5a433f81b9b1141d3dfce9b547596e21bbf92ddf05aba46e3263d5bed8971b438a294faf121414672ca5704ab3c20d37e8e097dc
|
data/capistrano-git-copy.gemspec
CHANGED
data/lib/capistrano/git/copy.rb
CHANGED
@@ -10,7 +10,6 @@ namespace :load do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
namespace :git_copy do
|
13
|
-
|
14
13
|
task :wrapper do
|
15
14
|
on roles :all do
|
16
15
|
fail "git-archive-all binary not found" if fetch(:git_archive_all_bin).strip.length == 0
|
@@ -22,21 +21,23 @@ namespace :git_copy do
|
|
22
21
|
|
23
22
|
desc 'Create tar and upload to server'
|
24
23
|
task update: :'git_copy:wrapper' do
|
25
|
-
|
26
|
-
|
24
|
+
tmp_path = fetch(:git_copy_tmp_path)
|
25
|
+
local_repo_path = File.join(tmp_path, 'repo')
|
26
|
+
local_tar_file = File.join(tmp_path, 'archive.tar.gz')
|
27
|
+
|
28
|
+
local_repo_url = `cd #{local_repo_path} 2>/dev/null && git config --get remote.origin.url 2>/dev/null`.strip
|
27
29
|
|
28
|
-
system("rm -rf #{fetch(:
|
29
|
-
system("mkdir -p #{
|
30
|
+
system("rm -rf #{tmp_path}") unless fetch(:repo_url) == local_repo_url
|
31
|
+
system("mkdir -p #{tmp_path}")
|
30
32
|
|
31
|
-
system("git clone #{fetch(:repo_url)} #{local_repo_path}")
|
33
|
+
system("if [ -d #{local_repo_path} ]; then cd #{local_repo_path} && git fetch origin; else git clone #{fetch(:repo_url)} #{local_repo_path}; fi")
|
32
34
|
|
33
35
|
on roles :all do
|
34
|
-
system("cd #{local_repo_path} && git
|
36
|
+
system("cd #{local_repo_path} && git reset --hard origin/#{fetch(:branch)} && git submodule init && git submodule update && git-archive-all __tmp.tar")
|
35
37
|
system("cd #{local_repo_path} && tar -xf __tmp.tar && cd __tmp && tar -czf #{local_tar_file} .")
|
36
38
|
|
37
39
|
upload!(local_tar_file, "#{fetch(:tmp_dir)}/#{fetch(:application)}_#{fetch(:stage)}.tar.gz")
|
38
40
|
|
39
|
-
system("rm -rf #{local_repo_path}")
|
40
41
|
system("rm -rf #{local_tar_file}")
|
41
42
|
end
|
42
43
|
end
|
metadata
CHANGED
@@ -1,55 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-git-copy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
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-02-
|
11
|
+
date: 2014-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
description: Copy local git repository deploy strategy for capistrano
|
@@ -59,7 +73,7 @@ executables: []
|
|
59
73
|
extensions: []
|
60
74
|
extra_rdoc_files: []
|
61
75
|
files:
|
62
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
63
77
|
- Gemfile
|
64
78
|
- LICENSE.txt
|
65
79
|
- README.md
|
@@ -82,18 +96,19 @@ require_paths:
|
|
82
96
|
- lib
|
83
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
98
|
requirements:
|
85
|
-
- -
|
99
|
+
- - ">="
|
86
100
|
- !ruby/object:Gem::Version
|
87
101
|
version: '0'
|
88
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
103
|
requirements:
|
90
|
-
- -
|
104
|
+
- - ">="
|
91
105
|
- !ruby/object:Gem::Version
|
92
106
|
version: '0'
|
93
107
|
requirements: []
|
94
108
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.0
|
109
|
+
rubygems_version: 2.2.0
|
96
110
|
signing_key:
|
97
111
|
specification_version: 4
|
98
112
|
summary: Copy local git repository deploy strategy for capistrano
|
99
113
|
test_files: []
|
114
|
+
has_rdoc:
|