Class: Lutaml::Xsd::Commands::PackageCommand::AutoBuildCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Lutaml::Xsd::Commands::PackageCommand::AutoBuildCommand
- Defined in:
- lib/lutaml/xsd/commands/package_command.rb
Overview
Auto-build command implementation
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#initialize(config_file, options) ⇒ AutoBuildCommand
constructor
A new instance of AutoBuildCommand.
- #run ⇒ Object
Constructor Details
#initialize(config_file, options) ⇒ AutoBuildCommand
Returns a new instance of AutoBuildCommand.
775 776 777 778 |
# File 'lib/lutaml/xsd/commands/package_command.rb', line 775 def initialize(config_file, ) super() @config_file = config_file end |
Instance Method Details
#run ⇒ Object
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 |
# File 'lib/lutaml/xsd/commands/package_command.rb', line 780 def run validate_config_file package_path = determine_package_path if should_rebuild?(package_path) verbose_output "Cache is stale or --force specified, rebuilding..." build_package else output "✓ Package is up-to-date: #{package_path}" output " Use --force to rebuild anyway" end rescue StandardError => e error "Auto-build failed: #{e.}" verbose_output e.backtrace.join("\n") if verbose? exit 1 end |