autoproj 1.9.7.rc13 → 1.9.7.rc14

Sign up to get free protection for your applications and to get access to all the features.
@@ -2519,6 +2519,7 @@ end
2519
2519
  # run autoproj bootstrap manually.
2520
2520
  if ARGV.first != "localdev"
2521
2521
  if ARGV.first == "dev"
2522
+ ENV['AUTOPROJ_USE_PRERELEASE'] = 1
2522
2523
  Autoproj::PackageManagers::GemManager.with_prerelease = true
2523
2524
  ARGV.shift
2524
2525
  end
@@ -198,6 +198,7 @@ end
198
198
  # run autoproj bootstrap manually.
199
199
  if ARGV.first != "localdev"
200
200
  if ARGV.first == "dev"
201
+ ENV['AUTOPROJ_USE_PRERELEASE'] = 1
201
202
  Autoproj::PackageManagers::GemManager.with_prerelease = true
202
203
  ARGV.shift
203
204
  end
@@ -206,8 +206,10 @@ module Autoproj
206
206
  end
207
207
  end
208
208
 
209
- def self.update_myself
210
- return if !Autoproj::CmdLine.update_os_dependencies?
209
+ def self.update_myself(options = Hash.new)
210
+ options = Kernel.validate_options options,
211
+ :force => false
212
+ return if !options[:force] && !Autoproj::CmdLine.update_os_dependencies?
211
213
 
212
214
  handle_ruby_version
213
215
 
@@ -217,8 +219,25 @@ module Autoproj
217
219
  return
218
220
  end
219
221
 
222
+ use_prerelease =
223
+ if env_flag = ENV['AUTOPROJ_USE_PRERELEASE']
224
+ env_flag == '1'
225
+ elsif Autoproj.has_config_key?('autoproj_use_prerelease')
226
+ Autoproj.user_config('autoproj_use_prerelease')
227
+ end
228
+ Autoproj.change_option "autoproj_use_prerelease", use_prerelease, true
229
+
230
+ did_update =
231
+ begin
232
+ saved_flag = PackageManagers::GemManager.with_prerelease
233
+ PackageManagers::GemManager.with_prerelease = use_prerelease
234
+ Autoproj.osdeps.install(%w{autobuild autoproj})
235
+ ensure
236
+ PackageManagers::GemManager.with_prerelease = saved_flag
237
+ end
238
+
220
239
  # First things first, see if we need to update ourselves
221
- if Autoproj.osdeps.install(%w{autobuild autoproj})
240
+ if did_update
222
241
  puts
223
242
  Autoproj.message 'autoproj and/or autobuild has been updated, restarting autoproj'
224
243
  puts
@@ -1564,7 +1583,7 @@ where 'mode' is one of:
1564
1583
  end
1565
1584
  osdeps.osdeps_mode
1566
1585
 
1567
- osdeps.install ['autoproj']
1586
+ update_myself :force => true
1568
1587
 
1569
1588
  reuse = []
1570
1589
  parser = lambda do |opt|
@@ -1578,6 +1597,7 @@ where 'mode' is one of:
1578
1597
  end
1579
1598
  args = parse_arguments(args, false, &parser)
1580
1599
  Autoproj.change_option 'reused_autoproj_installations', reuse, true
1600
+ Autoproj.export_env_sh
1581
1601
 
1582
1602
  # If we are not getting the installation setup from a VCS, copy the template
1583
1603
  # files
@@ -1586,10 +1606,6 @@ where 'mode' is one of:
1586
1606
  FileUtils.cp_r File.join(sample_dir, "autoproj"), "autoproj"
1587
1607
  end
1588
1608
 
1589
- handle_ruby_version
1590
-
1591
- Autoproj.export_env_sh
1592
-
1593
1609
  if args.size == 1 # the user asks us to download a manifest
1594
1610
  manifest_url = args.first
1595
1611
  Autoproj.message("autoproj: downloading manifest file #{manifest_url}", :bold)
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.7.rc13"
2
+ VERSION = "1.9.7.rc14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7.rc13
4
+ version: 1.9.7.rc14
5
5
  prerelease: 6
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-25 00:00:00.000000000 Z
12
+ date: 2014-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild