evrone-ci-common 0.2.0.pre5 → 0.2.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evrone/ci/common/version.rb +1 -1
- data/lib/evrone/ci/scm/git.rb +4 -2
- data/spec/lib/scm/git_spec.rb +2 -2
- 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: d448d8e0e53f9547a1a94e5b1dd1adc6b00f1a04
|
4
|
+
data.tar.gz: 5db1bccc35883d77e019b6ca6f2996c88382339d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0578171d5a060b6cecc9a44dad6670a36365bc407a7467fe5f421000a089cfcd2191c8b8fa50fa36d8e24fc065a782973cddc35eaf1e3438d4c2d4278c15af7
|
7
|
+
data.tar.gz: 11acadc664a7dff01db36111650d58ab3c9e48623e2294a871bf6e55d9acba93e18d3c04a495ff3eef4e58c67898487de6ec38778f53a96b5e957d76f092cd06
|
data/lib/evrone/ci/scm/git.rb
CHANGED
@@ -38,8 +38,10 @@ module Evrone
|
|
38
38
|
%{ (cd '#{from}' && git checkout-index -a -f --prefix='#{to}/') }.strip
|
39
39
|
end
|
40
40
|
|
41
|
-
def make_fetch_command
|
42
|
-
|
41
|
+
def make_fetch_command(options = {})
|
42
|
+
depth = options.key?(:depth) ? options[:depth] : 50
|
43
|
+
clone_branch = " --branch=#{branch}" if branch
|
44
|
+
clone_cmd = "git clone -q --depth=#{depth}#{clone_branch} #{src} #{path}"
|
43
45
|
checkout_cmd = "git checkout -qf #{sha}"
|
44
46
|
fetch_cmd = "git fetch -q origin"
|
45
47
|
cmd = %{
|
data/spec/lib/scm/git_spec.rb
CHANGED
@@ -57,7 +57,7 @@ describe Evrone::CI::SCM::Git do
|
|
57
57
|
|
58
58
|
it "should capture output" do
|
59
59
|
subject
|
60
|
-
expect(output).to match(Regexp.escape "$ git clone -q #{src} #{path}")
|
60
|
+
expect(output).to match(Regexp.escape "$ git clone -q --depth=50 #{src} #{path}")
|
61
61
|
end
|
62
62
|
|
63
63
|
context "twice" do
|
@@ -78,7 +78,7 @@ describe Evrone::CI::SCM::Git do
|
|
78
78
|
context "make_fetch_command" do
|
79
79
|
include Evrone::Common::Spawn
|
80
80
|
|
81
|
-
let(:options) { { deploy_key: deploy_key } }
|
81
|
+
let(:options) { { deploy_key: deploy_key, branch: "master" } }
|
82
82
|
let(:run) do
|
83
83
|
git.open do
|
84
84
|
spawn(git_ssh_env, git.make_fetch_command, &method(:add_to_output))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evrone-ci-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.pre6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Galinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evrone-common-spawn
|