capistrano-git-copy 0.1.0 → 0.2.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: 90b1a801508b4e93149fa20b38570b91e685f865
4
- data.tar.gz: 4a5f529dbb78d58f7ccaadc0c634af1229c8deae
3
+ metadata.gz: 9843651d93a14f12fca78795fed3654ade0c30cc
4
+ data.tar.gz: 706c6e4ae076521b794c31f0af831d9698ad1272
5
5
  SHA512:
6
- metadata.gz: 59103edd7941755f88fce4197840fd3167766bc99a44ebb3cda64e36bee5f1af221ee77a71dd5255d8033ee5e9ce2560ed6adc780510b96c60def1dedd102a9c
7
- data.tar.gz: 922359ed84e42518243e4616112df09db2d8b778f8ebd4c7c40afd757ef90a4fb892c50829fa9875ab30dc0236831f686001ec9b81cbc52f0dae0628198c5247
6
+ metadata.gz: 0f63eb347f0d6ea7d28882e2d13e171e119c7108c7e9b528eb30553260c5decf2b56636bde0ff2e4e00ee81a58645d7164be496971061d082fdf5254ad1d404f
7
+ data.tar.gz: 407bff892e724b1b0d257712477f9d2b974990855f3fd64f3e7227067b52dc5029a1fc4affec4b7a01f34eaf6fbbf2474b5325f9f11e1851af2960d9562d2829
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Creates a tar archive from the locale git repository and uploads it to the remote server.
4
4
 
5
+ ## Requirements
6
+
7
+ * [git-archive-all](https://github.com/Kentzo/git-archive-all)
8
+
5
9
  ## Installation
6
10
 
7
11
  Add this line to your application's Gemfile:
@@ -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 archive #{fetch(:branch)} | gzip --best > #{fetch(:local_tar_file)}")
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
 
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Git
3
3
  module Copy
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
6
6
  end
7
7
  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.1.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: 2013-12-11 00:00:00.000000000 Z
11
+ date: 2014-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano