lib/packwerk/cli.rb in packwerk-1.0.0 vs lib/packwerk/cli.rb in packwerk-1.0.1

- old
+ new

@@ -41,20 +41,23 @@ generate_configs when "check" check(args) when "update" update(args) + when "update-deprecations" + update_deprecations(args) when "validate" validate(args) when nil, "help" @err_out.puts(<<~USAGE) Usage: #{$PROGRAM_NAME} <subcommand> Subcommands: init - set up packwerk check - run all checks - update - update deprecated references + update - update deprecated references (deprecated, use update-deprecations instead) + update-deprecations - update deprecated references validate - verify integrity of packwerk and package configuration help - display help information about packwerk USAGE true else @@ -115,9 +118,14 @@ @out.puts(result) success end def update(paths) + warn("`packwerk update` is deprecated in favor of `packwerk update-deprecations`.") + update_deprecations(paths) + end + + def update_deprecations(paths) updating_deprecated_references = ::Packwerk::UpdatingDeprecatedReferences.new(@configuration.root_path) @run_context = Packwerk::RunContext.from_configuration( @configuration, reference_lister: updating_deprecated_references )