lib/origen/commands/web.rb in origen-0.24.0 vs lib/origen/commands/web.rb in origen-0.25.0
- old
+ new
@@ -1,7 +1,8 @@
require 'optparse'
require 'pathname'
+require 'origen/commands/helpers'
module Origen
options = {}
# App options are options that the application can supply to extend this command
@@ -47,12 +48,11 @@
end
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
opts.on('--no-serve', "Don't serve the website after compiling without the remote option") { options[:no_serve] = true }
opts.on('-c', '--comment COMMENT', String, 'Supply a commit comment when deploying to Git') { |o| options[:comment] = o }
- app_options.each do |app_option|
- opts.on(*app_option) {}
- end
+ # Apply any application option extensions to the OptionParser
+ Origen::CommandHelpers.extend_options(opts, app_options, options)
opts.separator ''
opts.on('-h', '--help', 'Show this message') { puts opts; exit }
end
opt_parser.parse! ARGV