autobuild 1.10.0.rc19 → 1.10.0.rc20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autobuild/import/git-lfs.rb +29 -6
- data/lib/autobuild/import/git.rb +10 -1
- data/lib/autobuild/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: ebb72391557598f96bcf4d7b8bb34e10ae44ee6e
|
4
|
+
data.tar.gz: 637a0ae6c9e1a70b079397985aa386d5a80c7353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b862462f126b226fbb2326c418330578bf8454a46b64ad92a33bc030bf908120e536c8f635be79fbe9e960c267b4f7323558497b5809bce1404534c7d0fba68b
|
7
|
+
data.tar.gz: ce5ce2cab50ec932500ca3f684df8676170d6aeea62d4810e98cb52d862c3e2c5007920901f3169fd99c320b83ee3a07226e0ee0b64acbb2415183512ed21d10
|
@@ -1,15 +1,38 @@
|
|
1
1
|
# Disable git-lfs at checkout time, we run install --local and pull later
|
2
|
-
Autobuild::Git.default_config['filter.lfs.smudge'] = ''
|
2
|
+
Autobuild::Git.default_config['filter.lfs.smudge'] = 'git-lfs smudge --skip -- %f'
|
3
3
|
Autobuild::Git.default_config['filter.lfs.required'] = 'false'
|
4
4
|
|
5
5
|
module Autobuild
|
6
6
|
Git.add_post_hook do |importer, package|
|
7
7
|
lfs_dir = File.join(package.srcdir, '.git', 'lfs')
|
8
|
-
if File.directory?(lfs_dir)
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
if File.directory?(lfs_dir)
|
9
|
+
importer.run_git(package, 'lfs', 'install', '--force', '--local', '--skip-smudge')
|
10
|
+
|
11
|
+
includes = importer.options.fetch(:lfs_include, '')
|
12
|
+
if includes.empty?
|
13
|
+
begin
|
14
|
+
importer.run_git_bare(package, 'config', '--local', '--unset', 'lfs.fetchinclude')
|
15
|
+
rescue SubcommandFailed => e
|
16
|
+
raise if e.status != 5
|
17
|
+
end
|
18
|
+
else
|
19
|
+
importer.run_git_bare(package, 'config', '--local', 'lfs.fetchinclude', includes)
|
20
|
+
end
|
21
|
+
|
22
|
+
excludes = importer.options.fetch(:lfs_exclude, '')
|
23
|
+
if excludes.empty?
|
24
|
+
begin
|
25
|
+
importer.run_git_bare(package, 'config', '--local', '--unset', 'lfs.fetchexclude')
|
26
|
+
rescue SubcommandFailed => e
|
27
|
+
raise if e.status != 5
|
28
|
+
end
|
29
|
+
else
|
30
|
+
importer.run_git_bare(package, 'config', '--local', 'lfs.fetchexclude', excludes)
|
31
|
+
end
|
32
|
+
|
33
|
+
if importer.options[:lfs] != false
|
34
|
+
importer.run_git(package, 'lfs', 'pull', importer.remote_name)
|
35
|
+
end
|
13
36
|
end
|
14
37
|
end
|
15
38
|
end
|
data/lib/autobuild/import/git.rb
CHANGED
@@ -132,7 +132,8 @@ def initialize(repository, branch = nil, options = {})
|
|
132
132
|
commit: nil,
|
133
133
|
repository_id: nil,
|
134
134
|
source_id: nil,
|
135
|
-
with_submodules: false
|
135
|
+
with_submodules: false,
|
136
|
+
single_branch: false
|
136
137
|
if gitopts[:branch] && branch
|
137
138
|
raise ConfigException, "git branch specified with both the option hash and the explicit parameter"
|
138
139
|
end
|
@@ -140,6 +141,7 @@ def initialize(repository, branch = nil, options = {})
|
|
140
141
|
|
141
142
|
super(common)
|
142
143
|
|
144
|
+
@single_branch = gitopts[:single_branch]
|
143
145
|
@with_submodules = gitopts.delete(:with_submodules)
|
144
146
|
@remote_name = 'autobuild'
|
145
147
|
@push_to = nil
|
@@ -243,6 +245,10 @@ def merge=(flag); @merge = flag end
|
|
243
245
|
# Whether the git checkout should be done with submodules
|
244
246
|
def with_submodules?; !!@with_submodules end
|
245
247
|
|
248
|
+
# Whether 'clone' should fetch only the remote branch, or all the
|
249
|
+
# branches
|
250
|
+
attr_predicate :single_branch?, true
|
251
|
+
|
246
252
|
# @api private
|
247
253
|
#
|
248
254
|
# Verifies that the package's {Package#importdir} points to a git
|
@@ -1043,6 +1049,9 @@ def checkout(package, options = Hash.new)
|
|
1043
1049
|
if with_submodules?
|
1044
1050
|
clone_options << '--recurse-submodules'
|
1045
1051
|
end
|
1052
|
+
if single_branch?
|
1053
|
+
clone_options << "--branch=#{remote_branch}" << "--single-branch"
|
1054
|
+
end
|
1046
1055
|
each_alternate_path(package) do |path|
|
1047
1056
|
clone_options << '--reference' << path
|
1048
1057
|
end
|
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.0.
|
4
|
+
version: 1.10.0.rc20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|