lib/omnibus/cli.rb in omnibus-3.1.1 vs lib/omnibus/cli.rb in omnibus-3.2.0.rc.1
- old
+ new
@@ -38,19 +38,16 @@
$stdout = @stdout
$stderr = @stderr
Omnibus::CLI.start(@argv)
@kernel.exit(0)
- rescue => e
+ rescue Omnibus::Error => e
error = Omnibus.ui.set_color(e.message, :red)
+ backtrace = Omnibus.ui.set_color("\n" + e.backtrace.join("\n "), :red)
Omnibus.ui.error(error)
+ Omnibus.ui.error(backtrace)
- if log.debug?
- backtrace = Omnibus.ui.set_color("\n" + e.backtrace.join("\n "), :red)
- Omnibus.ui.error(backtrace)
- end
-
if e.respond_to?(:status_code)
@kernel.exit(e.status_code)
else
@kernel.exit(1)
end
@@ -117,13 +114,13 @@
end
#
# Publish Omnibus package(s) to a backend.
#
- # $ omnibus release --project chefdk
+ # $ omnibus publish s3 pkg/*chef*
#
- register(Command::Release, 'release', 'release', 'Publish Omnibus packages')
- CLI.tasks['clean'].options = Command::Release.class_options
+ register(Command::Publish, 'publish', 'publish [COMMAND]', 'Publish Omnibus packages to a backend')
+ CLI.tasks['publish'].options = Command::Publish.class_options
#
# Display version information.
#
# $ omnibus version