lib/cli.rb in inqlude-0.7.2 vs lib/cli.rb in inqlude-0.7.3

- old
+ new

@@ -84,11 +84,11 @@ process_global_options options if options[:manifest_dir] @@settings.manifest_path = options[:manifest_dir] end - + manifest_handler = ManifestHandler.new(@@settings) manifest_handler.read_remote view = View.new(manifest_handler) view.enable_disqus = options[:enable_disqus] @@ -111,11 +111,11 @@ if options[:check_links] Upstream.get_involved "Implement --check-links option", 11 exit 1 end - + errors = [] if filename result = v.verify_file filename result.print_result @@ -144,10 +144,12 @@ puts " #{error.name}" error.errors.each do |e| puts " #{e}" end end + + exit 1 end end end desc "review <repo>", "Review pull requests on GitHub. Use 'username:branch' as repo parameter." @@ -159,11 +161,11 @@ else STDERR.puts "Unknown review action: '#{action}'" exit 1 end end - + desc "system_scan", "Scan system for installed Qt libraries and create manifests" method_option :dry_run, :type => :boolean, :desc => "Dry run. Don't write files." method_option :recreate_source_cache, :type => :boolean, :desc => "Recreate cache with meta data of installed RPMs" @@ -174,15 +176,15 @@ m.dry_run = options[:dry_run] if options[:recreate_source_cache] m.create_source_cache end - + if options[:recreate_qt_source_cache] m.create_qt_source_cache end - + m.process_all_rpms end desc "create <manifest_name> [version] [release_date]", "Create new or updated manifest" method_option :kf5, :type => :boolean, @@ -235,22 +237,22 @@ k.warnings.each do |warning| puts "#{warning[:name]}: #{warning[:issue]} (#{warning[:details]})" end end end - + desc "release_kde_frameworks <release_date> <version>", "Create release manifests for KDE frameworks release" def release_kde_frameworks release_date, version process_global_options options handler = ManifestHandler.new @@settings k = KdeFrameworksRelease.new handler k.read_generic_manifests k.write_release_manifests release_date, version end - + desc "get_involved", "Information about how to get involved" def get_involved Upstream.print_info end @@ -290,10 +292,10 @@ Downloader.new(handler, STDOUT).download(name, Dir.pwd) end end private - + def process_global_options options @@settings.offline = options[:offline] if options[:manifest_dir] @@settings.manifest_path = options[:manifest_dir] end