capistrano-git-copy 0.1.0 → 0.2.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 +4 -0
- data/lib/capistrano/git/copy/tasks/deploy.cap +8 -1
- data/lib/capistrano/git/copy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9843651d93a14f12fca78795fed3654ade0c30cc
|
4
|
+
data.tar.gz: 706c6e4ae076521b794c31f0af831d9698ad1272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f63eb347f0d6ea7d28882e2d13e171e119c7108c7e9b528eb30553260c5decf2b56636bde0ff2e4e00ee81a58645d7164be496971061d082fdf5254ad1d404f
|
7
|
+
data.tar.gz: 407bff892e724b1b0d257712477f9d2b974990855f3fd64f3e7227067b52dc5029a1fc4affec4b7a01f34eaf6fbbf2474b5325f9f11e1851af2960d9562d2829
|
data/README.md
CHANGED
@@ -4,6 +4,9 @@ namespace :git_copy do
|
|
4
4
|
|
5
5
|
task :wrapper do
|
6
6
|
on roles :all do
|
7
|
+
set :git_archive_all_bin, (fetch(:git_archive_all_bin) || `which git-archive-all`)
|
8
|
+
fail "git-archive-all binary not found" if fetch(:git_archive_all_bin).strip == ''
|
9
|
+
|
7
10
|
set :local_repo_path, File.join(Dir.tmpdir, "#{fetch(:application)}")
|
8
11
|
set :local_tar_file, File.join(Dir.tmpdir, "#{fetch(:application)}.tar.gz")
|
9
12
|
end
|
@@ -18,9 +21,13 @@ namespace :git_copy do
|
|
18
21
|
system("git clone #{fetch(:repo_url)} #{fetch(:local_repo_path)} > /dev/null 2> /dev/null")
|
19
22
|
|
20
23
|
on roles :all do
|
21
|
-
system("cd #{fetch(:local_repo_path)} && git
|
24
|
+
system("cd #{fetch(:local_repo_path)} && git checkout #{fetch(:branch)} && git submodule init && git submodule update && git-archive-all __tmp.tar")
|
25
|
+
system("cd #{fetch(:local_repo_path)} && tar -xf __tmp.tar && cd __tmp && tar -czf #{fetch(:local_tar_file)} .")
|
22
26
|
|
23
27
|
upload! fetch(:local_tar_file), "#{fetch(:tmp_dir)}/#{File.basename(fetch(:local_tar_file))}"
|
28
|
+
|
29
|
+
system("rm -rf #{fetch(:local_repo_path)}")
|
30
|
+
system("rm -rf #{fetch(:local_tar_file)}")
|
24
31
|
end
|
25
32
|
end
|
26
33
|
|
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.
|
4
|
+
version: 0.2.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:
|
11
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|