autobuild 1.7.12.rc4 → 1.7.12.rc5
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 +4 -4
- data/lib/autobuild/import/archive.rb +8 -4
- data/lib/autobuild/import/cvs.rb +1 -1
- data/lib/autobuild/import/darcs.rb +1 -1
- data/lib/autobuild/import/git.rb +18 -6
- data/lib/autobuild/import/hg.rb +15 -10
- data/lib/autobuild/importer.rb +16 -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: 9a4395f370d1e1c38b7e5b47ee51c44c21c4cf50
|
|
4
|
+
data.tar.gz: 2fbb94fa41c844eb6f883c89e82707bd5d11cee9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffc19e8cf7505968892cbb0428f4e24bc4bd77c29cb5e9b6837e23fab111ab8ad1c53fffd2560a47d475f8e8d142f176c249939bb8dbf3b9ccf5b0d759de993b
|
|
7
|
+
data.tar.gz: 2084cca9a550f9176f793f22a96040ce1cc0ba0be484d8463f6593b9c810fe160a094079081bb8b62f0bf832852b070b463e5390f7372bf82de70032639495a0
|
|
@@ -250,24 +250,28 @@ module Autobuild
|
|
|
250
250
|
# [:no_subdirectory] the archive does not have the custom archive
|
|
251
251
|
# subdirectory.
|
|
252
252
|
def initialize(url, options)
|
|
253
|
-
options =
|
|
253
|
+
sourceopts, options = Kernel.filter_options options,
|
|
254
|
+
:source_id, :repository_id
|
|
254
255
|
super(options)
|
|
256
|
+
|
|
255
257
|
if !@options.has_key?(:update_cached_file)
|
|
256
258
|
@options[:update_cached_file] = false
|
|
257
259
|
end
|
|
258
260
|
@cachedir = @options[:cachedir] || ArchiveImporter.cachedir
|
|
259
261
|
@retries = @options[:retries] || ArchiveImporter.retries
|
|
260
262
|
@timeout = @options[:timeout] || ArchiveImporter.timeout
|
|
261
|
-
|
|
262
|
-
relocate(url)
|
|
263
|
+
relocate(url, sourceopts)
|
|
263
264
|
end
|
|
264
265
|
|
|
265
266
|
# Changes the URL from which we should pick the archive
|
|
266
267
|
def relocate(url, options = Hash.new)
|
|
267
|
-
|
|
268
|
+
parsed_url = URI.parse(url)
|
|
269
|
+
@url = parsed_url
|
|
268
270
|
if !VALID_URI_SCHEMES.include?(@url.scheme)
|
|
269
271
|
raise ConfigException, "invalid URL #{@url} (local files must be prefixed with file://)"
|
|
270
272
|
end
|
|
273
|
+
@repository_id = options[:repository_id] || parsed_url
|
|
274
|
+
@source_id = options[:source_id] || parsed_url
|
|
271
275
|
|
|
272
276
|
filename = options[:filename] || File.basename(url).gsub(/\?.*/, '')
|
|
273
277
|
|
data/lib/autobuild/import/cvs.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Autobuild
|
|
|
21
21
|
@options_up = Array[*@options_up]
|
|
22
22
|
@options_co = cvsopts[:cvsco] || '-P'
|
|
23
23
|
@options_co = Array[*@options_co]
|
|
24
|
-
super(common)
|
|
24
|
+
super(common.merge(repository_id: "cvs:#{@root}:#{@module}"))
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Array of options to give to 'cvs checkout'
|
data/lib/autobuild/import/git.rb
CHANGED
|
@@ -43,7 +43,6 @@ module Autobuild
|
|
|
43
43
|
# doing
|
|
44
44
|
# Autobuild.programs['git'] = 'my_git_tool'
|
|
45
45
|
def initialize(repository, branch = nil, options = {})
|
|
46
|
-
@repository = repository.to_str
|
|
47
46
|
@alternates = Git.default_alternates.dup
|
|
48
47
|
@git_dir_cache = Array.new
|
|
49
48
|
|
|
@@ -61,11 +60,20 @@ module Autobuild
|
|
|
61
60
|
end
|
|
62
61
|
|
|
63
62
|
gitopts, common = Kernel.filter_options options,
|
|
64
|
-
|
|
65
|
-
:
|
|
63
|
+
push_to: nil,
|
|
64
|
+
branch: nil,
|
|
65
|
+
tag: nil,
|
|
66
|
+
commit: nil,
|
|
67
|
+
with_submodules: false
|
|
66
68
|
if gitopts[:branch] && branch
|
|
67
69
|
raise ConfigException, "git branch specified with both the option hash and the explicit parameter"
|
|
68
70
|
end
|
|
71
|
+
|
|
72
|
+
sourceopts, common = Kernel.filter_options common,
|
|
73
|
+
:repository_id, :source_id
|
|
74
|
+
|
|
75
|
+
super(common)
|
|
76
|
+
|
|
69
77
|
@push_to = gitopts[:push_to]
|
|
70
78
|
@with_submodules = gitopts[:with_submodules]
|
|
71
79
|
branch = gitopts[:branch] || branch
|
|
@@ -76,7 +84,7 @@ module Autobuild
|
|
|
76
84
|
@tag = tag
|
|
77
85
|
@commit = commit
|
|
78
86
|
@remote_name = 'autobuild'
|
|
79
|
-
|
|
87
|
+
relocate(repository, sourceopts)
|
|
80
88
|
end
|
|
81
89
|
|
|
82
90
|
# The name of the remote that should be set up by the importer
|
|
@@ -622,8 +630,12 @@ module Autobuild
|
|
|
622
630
|
end
|
|
623
631
|
|
|
624
632
|
# Changes the repository this importer is pointing to
|
|
625
|
-
def relocate(repository)
|
|
626
|
-
@repository = repository
|
|
633
|
+
def relocate(repository, options = Hash.new)
|
|
634
|
+
@repository = repository.to_str
|
|
635
|
+
@repository_id = options[:repository_id] ||
|
|
636
|
+
"git:#{@repository}"
|
|
637
|
+
@source_id = options[:source_id] ||
|
|
638
|
+
"#{@repository_id} branch=#{self.branch} tag=#{self.tag} commit=#{self.commit}"
|
|
627
639
|
end
|
|
628
640
|
|
|
629
641
|
# Tests whether the given directory is a git repository
|
data/lib/autobuild/import/hg.rb
CHANGED
|
@@ -16,13 +16,23 @@ module Autobuild
|
|
|
16
16
|
# @param [String] repository the repository URL
|
|
17
17
|
# @option options [String] :branch (default) the branch to track
|
|
18
18
|
def initialize(repository, options = {})
|
|
19
|
-
@repository = repository.to_str
|
|
20
|
-
|
|
21
19
|
hgopts, common = Kernel.filter_options options,
|
|
22
|
-
:
|
|
23
|
-
|
|
20
|
+
branch: 'default'
|
|
21
|
+
sourceopts, common = Kernel.filter_options options,
|
|
22
|
+
:repository_id, :source_id
|
|
23
|
+
|
|
24
|
+
super(common)
|
|
24
25
|
@branch = hgopts[:branch]
|
|
25
|
-
|
|
26
|
+
relocate(repository, sourceopts)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Changes the repository this importer is pointing to
|
|
30
|
+
def relocate(repository, options = Hash.new)
|
|
31
|
+
@repository = repository
|
|
32
|
+
@repository_id = options[:repository_id] ||
|
|
33
|
+
"hg:#{@repository}"
|
|
34
|
+
@source_id = options[:source_id] ||
|
|
35
|
+
"#{self.repository_id} branch=#{self.branch}"
|
|
26
36
|
end
|
|
27
37
|
|
|
28
38
|
# The remote repository URL.
|
|
@@ -60,11 +70,6 @@ module Autobuild
|
|
|
60
70
|
Subprocess.run(package, :import,
|
|
61
71
|
Autobuild.tool('hg'), 'clone', '-u', branch, repository, package.importdir)
|
|
62
72
|
end
|
|
63
|
-
|
|
64
|
-
# Changes the repository this importer is pointing to
|
|
65
|
-
def relocate(repository)
|
|
66
|
-
@repository = repository
|
|
67
|
-
end
|
|
68
73
|
end
|
|
69
74
|
|
|
70
75
|
# Creates a hg importer which gets the source for the given repository and branch
|
data/lib/autobuild/importer.rb
CHANGED
|
@@ -72,14 +72,29 @@ class Importer
|
|
|
72
72
|
@options = options.dup
|
|
73
73
|
@options[:retry_count] = Integer(@options[:retry_count] || 0)
|
|
74
74
|
@repository_id = options[:repository_id] || "#{self.class.name}:#{object_id}"
|
|
75
|
+
@source_id = options[:source_id] || @repository_id
|
|
75
76
|
end
|
|
76
77
|
|
|
77
78
|
# Returns a string that identifies the remote repository uniquely
|
|
78
79
|
#
|
|
79
80
|
# This can be used to check whether two importers are pointing to the same
|
|
80
|
-
# repository, regardless of e.g. the access protocol used
|
|
81
|
+
# repository, regardless of e.g. the access protocol used. For instance,
|
|
82
|
+
# two git importers that point to the same repository but different branches
|
|
83
|
+
# would have the same repository_id but different source_id
|
|
84
|
+
#
|
|
85
|
+
# @see source_id
|
|
81
86
|
attr_reader :repository_id
|
|
82
87
|
|
|
88
|
+
# Returns a string that identifies the remote source uniquely
|
|
89
|
+
#
|
|
90
|
+
# This can be used to check whether two importers are pointing to the same
|
|
91
|
+
# code base inside the same repository. For instance, two git importers that
|
|
92
|
+
# point to the same repository but different branches would have the same
|
|
93
|
+
# repository_id but different source_id
|
|
94
|
+
#
|
|
95
|
+
# @see repository_id
|
|
96
|
+
attr_reader :source_id
|
|
97
|
+
|
|
83
98
|
# The number of times update / checkout should be retried before giving up.
|
|
84
99
|
# The default is 0 (do not retry)
|
|
85
100
|
#
|
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.7.12.
|
|
4
|
+
version: 1.7.12.rc5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sylvain Joyeux
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-10-
|
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|