autoproj 2.0.0.rc27 → 2.0.0.rc28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/autoproj_bootstrap +45 -46
- data/bin/autoproj_install +45 -46
- data/lib/autoproj/manifest.rb +2 -0
- data/lib/autoproj/ops/install.rb +44 -45
- data/lib/autoproj/vcs_definition.rb +29 -5
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +5 -0
- 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: 9ff2813bce521361e3a276e51e0216c18d8b1c00
|
4
|
+
data.tar.gz: 78a98d21be75cc93a22aac09620237764eb72601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413db816723732af3a77178b5cfdad3af88b68fc2444378f1202f4ce914b8370bb887067b0d7d12b0cb89d61508cfddc1a7122354441ff6562fedc033a263ab4
|
7
|
+
data.tar.gz: a3666e0265f2c94ef9616610bcbd78d474384360ff73c8fe56e86b3427927840b97365d3be33406d000f90ab3bc90396b35b734c9bb86935dd64b61af5bc722c
|
data/bin/autoproj_bootstrap
CHANGED
@@ -204,13 +204,13 @@ module Autoproj
|
|
204
204
|
self.private_autoproj = false
|
205
205
|
self.private_gems = false
|
206
206
|
end
|
207
|
-
opt.on '--private-bundler[=PATH]', 'install bundler locally in the workspace' do |path|
|
207
|
+
opt.on '--private-bundler[=PATH]', 'install bundler locally in the workspace, or in a dedicated path' do |path|
|
208
208
|
self.private_bundler = path || true
|
209
209
|
end
|
210
|
-
opt.on '--private-autoproj[=PATH]', 'install autoproj locally in the workspace' do |path|
|
210
|
+
opt.on '--private-autoproj[=PATH]', 'install autoproj locally in the workspace, or in a dedicated path' do |path|
|
211
211
|
self.private_autoproj = path || true
|
212
212
|
end
|
213
|
-
opt.on '--private-gems[=PATH]', 'install gems locally in the prefix directory' do |path|
|
213
|
+
opt.on '--private-gems[=PATH]', 'install gems locally in the prefix directory, or in a dedicated path' do |path|
|
214
214
|
self.private_gems = path || true
|
215
215
|
end
|
216
216
|
opt.on '--private[=PATH]', "whether bundler, autoproj and the workspace gems should be installed locally in the workspace. This is the default, with a path of #{default_gem_path}" do |path|
|
@@ -224,6 +224,9 @@ module Autoproj
|
|
224
224
|
opt.on '--gemfile=PATH', String, 'use the given Gemfile to install autoproj instead of the default' do |path|
|
225
225
|
@gemfile = File.read(path)
|
226
226
|
end
|
227
|
+
opt.on '--seed-config=PATH', String, 'path to a seed file that should be used to initialize the configuration' do |path|
|
228
|
+
@config.merge!(YAML.load(File.read(path)))
|
229
|
+
end
|
227
230
|
opt.on '--prefer-os-independent-packages', 'prefer OS-independent packages (such as a RubyGem) over their OS-packaged equivalent (e.g. the thor gem vs. the ruby-thor debian package)' do
|
228
231
|
@prefer_indep_over_os_packages = true
|
229
232
|
end
|
@@ -242,53 +245,41 @@ module Autoproj
|
|
242
245
|
autoproj_options + args
|
243
246
|
end
|
244
247
|
|
245
|
-
def
|
246
|
-
|
247
|
-
|
248
|
+
def find_bundler(gem_program)
|
249
|
+
result = system(
|
250
|
+
env_for_child.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
|
251
|
+
Gem.ruby, gem_program, 'which', 'bundler/setup',
|
252
|
+
out: '/dev/null')
|
253
|
+
return if !result
|
254
|
+
|
255
|
+
bundler_path = File.join(bundler_gem_home, 'bin', 'bundler')
|
256
|
+
if File.exist?(bundler_path)
|
257
|
+
bundler_path
|
258
|
+
else
|
259
|
+
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler_path}"
|
260
|
+
nil
|
261
|
+
end
|
262
|
+
end
|
248
263
|
|
264
|
+
def install_bundler(gem_program)
|
249
265
|
local = ['--local'] if local?
|
250
266
|
|
251
267
|
result = system(
|
252
268
|
env_for_child.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
|
253
|
-
Gem.ruby, gem_program, 'install', '--no-document', '--no-format-executable',
|
269
|
+
Gem.ruby, gem_program, 'install', '--env-shebang', '--no-document', '--no-format-executable',
|
254
270
|
*local,
|
255
271
|
"--bindir=#{File.join(bundler_gem_home, 'bin')}", 'bundler')
|
256
272
|
|
257
|
-
if result
|
258
|
-
|
259
|
-
else
|
260
|
-
STDERR.puts "FATAL: failed to install bundler in #{dot_autoproj}"
|
273
|
+
if !result
|
274
|
+
STDERR.puts "FATAL: failed to install bundler in #{bundler_gem_home}"
|
261
275
|
nil
|
262
276
|
end
|
263
|
-
end
|
264
|
-
|
265
|
-
def find_bundler
|
266
|
-
clean_env = env_for_child
|
267
|
-
if bundler = find_in_clean_path('bundler', gem_bindir)
|
268
|
-
return bundler
|
269
|
-
end
|
270
|
-
|
271
|
-
clean_path = env_for_child['PATH']
|
272
|
-
STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
|
273
|
-
STDERR.puts "installing it now ..."
|
274
|
-
bundler = install_bundler
|
275
|
-
if !bundler
|
276
|
-
if ENV['PATH'] != clean_path
|
277
|
-
STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
|
278
|
-
STDERR.puts " - if you are upgrading a v1 install, please contact the autoproj author at https://github.com/rock-core/autoproj/issues/new"
|
279
|
-
STDERR.puts " - if you are running a fresh install, try again in a console where the env.sh is not loaded"
|
280
|
-
exit 1
|
281
|
-
else
|
282
|
-
STDERR.puts " you might want to try and install it manually first by running 'gem install bundler'"
|
283
|
-
STDERR.puts " or call this command again with --private-bundler to have it installed in the workspace"
|
284
|
-
exit 1
|
285
|
-
end
|
286
|
-
end
|
287
277
|
|
288
|
-
|
289
|
-
|
278
|
+
bundler_path = File.join(bundler_gem_home, 'bin', 'bundler')
|
279
|
+
if File.exist?(bundler_path)
|
280
|
+
bundler_path
|
290
281
|
else
|
291
|
-
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{
|
282
|
+
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler_path}"
|
292
283
|
nil
|
293
284
|
end
|
294
285
|
end
|
@@ -440,21 +431,29 @@ module Autoproj
|
|
440
431
|
end
|
441
432
|
|
442
433
|
def install
|
443
|
-
if
|
434
|
+
if ENV['BUNDLER_GEMFILE']
|
435
|
+
raise "cannot run autoproj_install or autoproj_bootstrap while under a 'bundler exec' subcommand or having loaded an env.sh. Open a new console and try again"
|
436
|
+
end
|
437
|
+
|
438
|
+
gem_program = guess_gem_program
|
439
|
+
puts "Detected 'gem' to be #{gem_program}"
|
440
|
+
|
441
|
+
if bundler = find_bundler(gem_program)
|
442
|
+
puts "Detected bundler at #{bundler}"
|
443
|
+
else
|
444
444
|
puts "Installing bundler in #{bundler_gem_home}"
|
445
|
-
if !(bundler = install_bundler)
|
445
|
+
if !(bundler = install_bundler(gem_program))
|
446
446
|
exit 1
|
447
447
|
end
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
else
|
452
|
-
exit 1
|
448
|
+
if private_bundler?
|
449
|
+
env['GEM_PATH'].unshift bundler_gem_home
|
450
|
+
end
|
453
451
|
end
|
454
452
|
save_ruby_and_bundler_shims(bundler)
|
455
453
|
env['PATH'].unshift shim_path
|
456
454
|
save_gemfile
|
457
|
-
|
455
|
+
|
456
|
+
puts "Installing autoproj#{"in #{autoproj_gem_home}" if private_autoproj?}"
|
458
457
|
install_autoproj(bundler)
|
459
458
|
end
|
460
459
|
|
data/bin/autoproj_install
CHANGED
@@ -204,13 +204,13 @@ module Autoproj
|
|
204
204
|
self.private_autoproj = false
|
205
205
|
self.private_gems = false
|
206
206
|
end
|
207
|
-
opt.on '--private-bundler[=PATH]', 'install bundler locally in the workspace' do |path|
|
207
|
+
opt.on '--private-bundler[=PATH]', 'install bundler locally in the workspace, or in a dedicated path' do |path|
|
208
208
|
self.private_bundler = path || true
|
209
209
|
end
|
210
|
-
opt.on '--private-autoproj[=PATH]', 'install autoproj locally in the workspace' do |path|
|
210
|
+
opt.on '--private-autoproj[=PATH]', 'install autoproj locally in the workspace, or in a dedicated path' do |path|
|
211
211
|
self.private_autoproj = path || true
|
212
212
|
end
|
213
|
-
opt.on '--private-gems[=PATH]', 'install gems locally in the prefix directory' do |path|
|
213
|
+
opt.on '--private-gems[=PATH]', 'install gems locally in the prefix directory, or in a dedicated path' do |path|
|
214
214
|
self.private_gems = path || true
|
215
215
|
end
|
216
216
|
opt.on '--private[=PATH]', "whether bundler, autoproj and the workspace gems should be installed locally in the workspace. This is the default, with a path of #{default_gem_path}" do |path|
|
@@ -224,6 +224,9 @@ module Autoproj
|
|
224
224
|
opt.on '--gemfile=PATH', String, 'use the given Gemfile to install autoproj instead of the default' do |path|
|
225
225
|
@gemfile = File.read(path)
|
226
226
|
end
|
227
|
+
opt.on '--seed-config=PATH', String, 'path to a seed file that should be used to initialize the configuration' do |path|
|
228
|
+
@config.merge!(YAML.load(File.read(path)))
|
229
|
+
end
|
227
230
|
opt.on '--prefer-os-independent-packages', 'prefer OS-independent packages (such as a RubyGem) over their OS-packaged equivalent (e.g. the thor gem vs. the ruby-thor debian package)' do
|
228
231
|
@prefer_indep_over_os_packages = true
|
229
232
|
end
|
@@ -242,53 +245,41 @@ module Autoproj
|
|
242
245
|
autoproj_options + args
|
243
246
|
end
|
244
247
|
|
245
|
-
def
|
246
|
-
|
247
|
-
|
248
|
+
def find_bundler(gem_program)
|
249
|
+
result = system(
|
250
|
+
env_for_child.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
|
251
|
+
Gem.ruby, gem_program, 'which', 'bundler/setup',
|
252
|
+
out: '/dev/null')
|
253
|
+
return if !result
|
254
|
+
|
255
|
+
bundler_path = File.join(bundler_gem_home, 'bin', 'bundler')
|
256
|
+
if File.exist?(bundler_path)
|
257
|
+
bundler_path
|
258
|
+
else
|
259
|
+
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler_path}"
|
260
|
+
nil
|
261
|
+
end
|
262
|
+
end
|
248
263
|
|
264
|
+
def install_bundler(gem_program)
|
249
265
|
local = ['--local'] if local?
|
250
266
|
|
251
267
|
result = system(
|
252
268
|
env_for_child.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
|
253
|
-
Gem.ruby, gem_program, 'install', '--no-document', '--no-format-executable',
|
269
|
+
Gem.ruby, gem_program, 'install', '--env-shebang', '--no-document', '--no-format-executable',
|
254
270
|
*local,
|
255
271
|
"--bindir=#{File.join(bundler_gem_home, 'bin')}", 'bundler')
|
256
272
|
|
257
|
-
if result
|
258
|
-
|
259
|
-
else
|
260
|
-
STDERR.puts "FATAL: failed to install bundler in #{dot_autoproj}"
|
273
|
+
if !result
|
274
|
+
STDERR.puts "FATAL: failed to install bundler in #{bundler_gem_home}"
|
261
275
|
nil
|
262
276
|
end
|
263
|
-
end
|
264
|
-
|
265
|
-
def find_bundler
|
266
|
-
clean_env = env_for_child
|
267
|
-
if bundler = find_in_clean_path('bundler', gem_bindir)
|
268
|
-
return bundler
|
269
|
-
end
|
270
|
-
|
271
|
-
clean_path = env_for_child['PATH']
|
272
|
-
STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
|
273
|
-
STDERR.puts "installing it now ..."
|
274
|
-
bundler = install_bundler
|
275
|
-
if !bundler
|
276
|
-
if ENV['PATH'] != clean_path
|
277
|
-
STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
|
278
|
-
STDERR.puts " - if you are upgrading a v1 install, please contact the autoproj author at https://github.com/rock-core/autoproj/issues/new"
|
279
|
-
STDERR.puts " - if you are running a fresh install, try again in a console where the env.sh is not loaded"
|
280
|
-
exit 1
|
281
|
-
else
|
282
|
-
STDERR.puts " you might want to try and install it manually first by running 'gem install bundler'"
|
283
|
-
STDERR.puts " or call this command again with --private-bundler to have it installed in the workspace"
|
284
|
-
exit 1
|
285
|
-
end
|
286
|
-
end
|
287
277
|
|
288
|
-
|
289
|
-
|
278
|
+
bundler_path = File.join(bundler_gem_home, 'bin', 'bundler')
|
279
|
+
if File.exist?(bundler_path)
|
280
|
+
bundler_path
|
290
281
|
else
|
291
|
-
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{
|
282
|
+
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler_path}"
|
292
283
|
nil
|
293
284
|
end
|
294
285
|
end
|
@@ -440,21 +431,29 @@ module Autoproj
|
|
440
431
|
end
|
441
432
|
|
442
433
|
def install
|
443
|
-
if
|
434
|
+
if ENV['BUNDLER_GEMFILE']
|
435
|
+
raise "cannot run autoproj_install or autoproj_bootstrap while under a 'bundler exec' subcommand or having loaded an env.sh. Open a new console and try again"
|
436
|
+
end
|
437
|
+
|
438
|
+
gem_program = guess_gem_program
|
439
|
+
puts "Detected 'gem' to be #{gem_program}"
|
440
|
+
|
441
|
+
if bundler = find_bundler(gem_program)
|
442
|
+
puts "Detected bundler at #{bundler}"
|
443
|
+
else
|
444
444
|
puts "Installing bundler in #{bundler_gem_home}"
|
445
|
-
if !(bundler = install_bundler)
|
445
|
+
if !(bundler = install_bundler(gem_program))
|
446
446
|
exit 1
|
447
447
|
end
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
else
|
452
|
-
exit 1
|
448
|
+
if private_bundler?
|
449
|
+
env['GEM_PATH'].unshift bundler_gem_home
|
450
|
+
end
|
453
451
|
end
|
454
452
|
save_ruby_and_bundler_shims(bundler)
|
455
453
|
env['PATH'].unshift shim_path
|
456
454
|
save_gemfile
|
457
|
-
|
455
|
+
|
456
|
+
puts "Installing autoproj#{"in #{autoproj_gem_home}" if private_autoproj?}"
|
458
457
|
install_autoproj(bundler)
|
459
458
|
end
|
460
459
|
|
data/lib/autoproj/manifest.rb
CHANGED
data/lib/autoproj/ops/install.rb
CHANGED
@@ -194,13 +194,13 @@ def parse_options(args = ARGV)
|
|
194
194
|
self.private_autoproj = false
|
195
195
|
self.private_gems = false
|
196
196
|
end
|
197
|
-
opt.on '--private-bundler[=PATH]', 'install bundler locally in the workspace' do |path|
|
197
|
+
opt.on '--private-bundler[=PATH]', 'install bundler locally in the workspace, or in a dedicated path' do |path|
|
198
198
|
self.private_bundler = path || true
|
199
199
|
end
|
200
|
-
opt.on '--private-autoproj[=PATH]', 'install autoproj locally in the workspace' do |path|
|
200
|
+
opt.on '--private-autoproj[=PATH]', 'install autoproj locally in the workspace, or in a dedicated path' do |path|
|
201
201
|
self.private_autoproj = path || true
|
202
202
|
end
|
203
|
-
opt.on '--private-gems[=PATH]', 'install gems locally in the prefix directory' do |path|
|
203
|
+
opt.on '--private-gems[=PATH]', 'install gems locally in the prefix directory, or in a dedicated path' do |path|
|
204
204
|
self.private_gems = path || true
|
205
205
|
end
|
206
206
|
opt.on '--private[=PATH]', "whether bundler, autoproj and the workspace gems should be installed locally in the workspace. This is the default, with a path of #{default_gem_path}" do |path|
|
@@ -214,6 +214,9 @@ def parse_options(args = ARGV)
|
|
214
214
|
opt.on '--gemfile=PATH', String, 'use the given Gemfile to install autoproj instead of the default' do |path|
|
215
215
|
@gemfile = File.read(path)
|
216
216
|
end
|
217
|
+
opt.on '--seed-config=PATH', String, 'path to a seed file that should be used to initialize the configuration' do |path|
|
218
|
+
@config.merge!(YAML.load(File.read(path)))
|
219
|
+
end
|
217
220
|
opt.on '--prefer-os-independent-packages', 'prefer OS-independent packages (such as a RubyGem) over their OS-packaged equivalent (e.g. the thor gem vs. the ruby-thor debian package)' do
|
218
221
|
@prefer_indep_over_os_packages = true
|
219
222
|
end
|
@@ -232,10 +235,23 @@ def parse_options(args = ARGV)
|
|
232
235
|
autoproj_options + args
|
233
236
|
end
|
234
237
|
|
235
|
-
def
|
236
|
-
|
237
|
-
|
238
|
+
def find_bundler(gem_program)
|
239
|
+
result = system(
|
240
|
+
env_for_child.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
|
241
|
+
Gem.ruby, gem_program, 'which', 'bundler/setup',
|
242
|
+
out: '/dev/null')
|
243
|
+
return if !result
|
244
|
+
|
245
|
+
bundler_path = File.join(bundler_gem_home, 'bin', 'bundler')
|
246
|
+
if File.exist?(bundler_path)
|
247
|
+
bundler_path
|
248
|
+
else
|
249
|
+
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler_path}"
|
250
|
+
nil
|
251
|
+
end
|
252
|
+
end
|
238
253
|
|
254
|
+
def install_bundler(gem_program)
|
239
255
|
local = ['--local'] if local?
|
240
256
|
|
241
257
|
result = system(
|
@@ -244,41 +260,16 @@ def install_bundler
|
|
244
260
|
*local,
|
245
261
|
"--bindir=#{File.join(bundler_gem_home, 'bin')}", 'bundler')
|
246
262
|
|
247
|
-
if result
|
248
|
-
|
249
|
-
else
|
250
|
-
STDERR.puts "FATAL: failed to install bundler in #{dot_autoproj}"
|
263
|
+
if !result
|
264
|
+
STDERR.puts "FATAL: failed to install bundler in #{bundler_gem_home}"
|
251
265
|
nil
|
252
266
|
end
|
253
|
-
end
|
254
|
-
|
255
|
-
def find_bundler
|
256
|
-
clean_env = env_for_child
|
257
|
-
if bundler = find_in_clean_path('bundler', gem_bindir)
|
258
|
-
return bundler
|
259
|
-
end
|
260
|
-
|
261
|
-
clean_path = env_for_child['PATH']
|
262
|
-
STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
|
263
|
-
STDERR.puts "installing it now ..."
|
264
|
-
bundler = install_bundler
|
265
|
-
if !bundler
|
266
|
-
if ENV['PATH'] != clean_path
|
267
|
-
STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
|
268
|
-
STDERR.puts " - if you are upgrading a v1 install, please contact the autoproj author at https://github.com/rock-core/autoproj/issues/new"
|
269
|
-
STDERR.puts " - if you are running a fresh install, try again in a console where the env.sh is not loaded"
|
270
|
-
exit 1
|
271
|
-
else
|
272
|
-
STDERR.puts " you might want to try and install it manually first by running 'gem install bundler'"
|
273
|
-
STDERR.puts " or call this command again with --private-bundler to have it installed in the workspace"
|
274
|
-
exit 1
|
275
|
-
end
|
276
|
-
end
|
277
267
|
|
278
|
-
|
279
|
-
|
268
|
+
bundler_path = File.join(bundler_gem_home, 'bin', 'bundler')
|
269
|
+
if File.exist?(bundler_path)
|
270
|
+
bundler_path
|
280
271
|
else
|
281
|
-
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{
|
272
|
+
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler_path}"
|
282
273
|
nil
|
283
274
|
end
|
284
275
|
end
|
@@ -430,21 +421,29 @@ def save_ruby_and_bundler_shims(bundler_path)
|
|
430
421
|
end
|
431
422
|
|
432
423
|
def install
|
433
|
-
if
|
424
|
+
if ENV['BUNDLER_GEMFILE']
|
425
|
+
raise "cannot run autoproj_install or autoproj_bootstrap while under a 'bundler exec' subcommand or having loaded an env.sh. Open a new console and try again"
|
426
|
+
end
|
427
|
+
|
428
|
+
gem_program = guess_gem_program
|
429
|
+
puts "Detected 'gem' to be #{gem_program}"
|
430
|
+
|
431
|
+
if bundler = find_bundler(gem_program)
|
432
|
+
puts "Detected bundler at #{bundler}"
|
433
|
+
else
|
434
434
|
puts "Installing bundler in #{bundler_gem_home}"
|
435
|
-
if !(bundler = install_bundler)
|
435
|
+
if !(bundler = install_bundler(gem_program))
|
436
436
|
exit 1
|
437
437
|
end
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
else
|
442
|
-
exit 1
|
438
|
+
if private_bundler?
|
439
|
+
env['GEM_PATH'].unshift bundler_gem_home
|
440
|
+
end
|
443
441
|
end
|
444
442
|
save_ruby_and_bundler_shims(bundler)
|
445
443
|
env['PATH'].unshift shim_path
|
446
444
|
save_gemfile
|
447
|
-
|
445
|
+
|
446
|
+
puts "Installing autoproj#{"in #{autoproj_gem_home}" if private_autoproj?}"
|
448
447
|
install_autoproj(bundler)
|
449
448
|
end
|
450
449
|
|
@@ -2,15 +2,35 @@ module Autoproj
|
|
2
2
|
# Representation of a VCS definition contained in a source.yml file or in
|
3
3
|
# autoproj/manifest
|
4
4
|
class VCSDefinition
|
5
|
+
# The VCS type
|
6
|
+
#
|
7
|
+
# @return [Symbol]
|
5
8
|
attr_reader :type
|
9
|
+
|
10
|
+
# The VCS URL
|
11
|
+
#
|
12
|
+
# @return [String]
|
6
13
|
attr_reader :url
|
14
|
+
|
15
|
+
# The VCS options
|
16
|
+
#
|
17
|
+
# @return [Hash]
|
7
18
|
attr_reader :options
|
8
19
|
|
9
|
-
# This VCSDefinition history
|
10
|
-
#
|
20
|
+
# This VCSDefinition history
|
21
|
+
#
|
22
|
+
# i.e. the list of VCSDefinition objects that led to this one by means
|
23
|
+
# of calls to {#update}
|
24
|
+
#
|
25
|
+
# @return [Array<VCSDefinition>]
|
11
26
|
attr_reader :history
|
12
|
-
|
13
|
-
#
|
27
|
+
|
28
|
+
# The original spec in hash form
|
29
|
+
#
|
30
|
+
# Set if this VCSDefinition object has been created using
|
31
|
+
# VCSDefinition.from_raw
|
32
|
+
#
|
33
|
+
# @return [nil,Hash]
|
14
34
|
attr_reader :raw
|
15
35
|
|
16
36
|
def initialize(type, url, vcs_options, options = Hash.new)
|
@@ -34,12 +54,16 @@ def initialize(type, url, vcs_options, options = Hash.new)
|
|
34
54
|
@raw = options[:raw] || [[options[:from], to_hash]]
|
35
55
|
end
|
36
56
|
|
57
|
+
# Whether this points to a local directory
|
37
58
|
def local?
|
38
59
|
@type == 'local'
|
39
60
|
end
|
40
61
|
|
62
|
+
# Converts self to a Hash description that could be passed to {.from_raw}
|
63
|
+
#
|
64
|
+
# @return [Hash]
|
41
65
|
def to_hash
|
42
|
-
Hash[:
|
66
|
+
Hash[type: type, url: url].merge(options)
|
43
67
|
end
|
44
68
|
|
45
69
|
# Update this VCS definition with new information / options and return
|
data/lib/autoproj/version.rb
CHANGED
data/lib/autoproj/workspace.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc28
|
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-07-
|
11
|
+
date: 2016-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autobuild
|