lib/autoproj/cli/main.rb in autoproj-2.0.0.rc4 vs lib/autoproj/cli/main.rb in autoproj-2.0.0.rc5
- old
+ new
@@ -1,17 +1,13 @@
require 'thor'
-require 'autoproj'
require 'autoproj/cli/main_test'
module Autoproj
module CLI
def self.basic_setup
Encoding.default_internal = Encoding::UTF_8
Encoding.default_external = Encoding::UTF_8
-
- Autobuild::Reporting << Autoproj::Reporter.new
- Autobuild::Package.clear
end
class Main < Thor
class_option :verbose, type: :boolean,
desc: 'turns verbose output',
@@ -65,10 +61,12 @@
desc: 'only use locally available information (mainly for distributed version control systems such as git)'
option :mainline, type: :string,
desc: "compare to the given baseline. if 'true', the comparison will ignore any override, otherwise it will take into account overrides only up to the given package set"
option :snapshot, type: :boolean, default: false,
desc: "use the VCS information as 'versions --no-local' would detect it instead of the one in the configuration"
+ option :parallel, aliases: :p, type: :numeric,
+ desc: 'maximum number of parallel jobs'
def status(*packages)
run_autoproj_cli(:status, :Status, Hash[], *packages)
end
desc 'doc [PACKAGES]', 'generate API documentation for packages that support it'
@@ -310,12 +308,32 @@
desc: "customize what should be displayed. See FORMAT SPECIFICATION above"
def query(query_string = nil)
run_autoproj_cli(:query, :Query, Hash[], *Array(query_string))
end
- desc "upgrade autoproj itself"
+ desc 'upgrade', "upgrade autoproj itself, and the workspace layout"
+ option :local, type: :boolean, default: false,
+ desc: 'do not access the network (will fail if some gems are missing)'
+ option :gemfile, type: :string,
+ desc: 'path to a gemfile that should be used to install autoproj'
+ option :private_bundler, type: :boolean,
+ desc: 'install bundler inside the workspace instead of using the default Gem location'
+ option :private_gems, type: :boolean,
+ desc: 'install gems inside the workspace instead of using the default Gem location'
+ option :private_autoproj, type: :boolean,
+ desc: 'install bundler inside the workspace instead of using the default Gem location'
+ option :private, type: :boolean,
+ desc: 'equivalent to --private-bundler --private-autoproj --private-gems'
def upgrade
- run_autoproj_cli(:upgrade, :Upgrade, Hash[])
+ require 'autoproj/cli/upgrade'
+ Autoproj::CLI::Upgrade.new.run(options)
+ end
+
+ desc 'install_stage2 ROOT_DIR', 'used by autoproj_install to finalize the installation',
+ hide: true
+ def install_stage2(root_dir)
+ require 'autoproj/ops/install'
+ Autoproj::Ops::Install.new(root_dir).run(stage2: true)
end
end
end
end