capistrano-scm-local 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/capistrano-scm-local.gemspec +1 -1
- data/lib/capistrano/local.rb +7 -4
- metadata +2 -2
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "capistrano-scm-local"
|
7
|
-
gem.version = '0.1.
|
7
|
+
gem.version = '0.1.9'
|
8
8
|
gem.authors = ["Boris Gorbylev"]
|
9
9
|
gem.email = ["ekho@ekho.name"]
|
10
10
|
gem.description = %q{Capistrano extension for deploying form local directory}
|
data/lib/capistrano/local.rb
CHANGED
@@ -8,6 +8,8 @@ include Archive::Tar
|
|
8
8
|
require 'tmpdir'
|
9
9
|
require 'fileutils'
|
10
10
|
|
11
|
+
require 'rake/packagetask'
|
12
|
+
|
11
13
|
class Capistrano::Local < Capistrano::SCM
|
12
14
|
module PlainStrategy
|
13
15
|
def check
|
@@ -33,14 +35,15 @@ class Capistrano::Local < Capistrano::SCM
|
|
33
35
|
archive = ''
|
34
36
|
# preparing archive
|
35
37
|
run_locally do
|
36
|
-
archive = fetch(:tmp_dir, Dir::tmpdir()) + '/' + fetch(:application, 'distr') + "-#{
|
38
|
+
archive = fetch(:tmp_dir, Dir::tmpdir()) + '/capistrano/' + fetch(:application, 'distr') + "-#{fetch(:current_revision)}.tar.gz"
|
39
|
+
execute :mkdir, '-p', File.dirname(archive)
|
37
40
|
unless File.exists?(archive)
|
38
41
|
if File.directory?(repo_url) || !File.fnmatch('*.tar.gz', repo_url)
|
39
|
-
|
40
|
-
|
42
|
+
within repo_url do
|
43
|
+
execute :tar, 'czf', archive, './*'
|
41
44
|
end
|
42
45
|
else
|
43
|
-
|
46
|
+
execute :cp, repo_url, archive
|
44
47
|
end
|
45
48
|
end
|
46
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-scm-local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|