Class: Bridgetown::Commands::Apply
- Inherits:
-
Bridgetown::Command
- Object
- Samovar::Command
- Bridgetown::Command
- Bridgetown::Commands::Apply
- Includes:
- Automations
- Defined in:
- bridgetown-core/lib/bridgetown-core/commands/apply.rb
Constant Summary
Constants included from Automations
Bridgetown::Commands::Automations::CODEBERG_REGEX, Bridgetown::Commands::Automations::CODEBERG_REPO_REGEX, Bridgetown::Commands::Automations::CODEBERG_TREE_REGEX, Bridgetown::Commands::Automations::GITHUB_BLOB_REGEX, Bridgetown::Commands::Automations::GITHUB_REGEX, Bridgetown::Commands::Automations::GITHUB_REPO_REGEX, Bridgetown::Commands::Automations::GITHUB_TREE_REGEX, Bridgetown::Commands::Automations::GITLAB_BLOB_REGEX, Bridgetown::Commands::Automations::GITLAB_REGEX, Bridgetown::Commands::Automations::GITLAB_REPO_REGEX, Bridgetown::Commands::Automations::GITLAB_TREE_REGEX
Instance Method Summary collapse
Methods included from Automations
#add_gem, #add_initializer, #add_npm_for_gem, #add_npm_package, #apply_from_url, #create_builder, included, #javascript_import, #remove_npm_package, #ruby_configure
Methods inherited from Bridgetown::Command
Instance Method Details
#call(new_site_dir: nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'bridgetown-core/lib/bridgetown-core/commands/apply.rb', line 12 def call(new_site_dir: nil) self.source_paths = [Dir.pwd] @logger = Bridgetown.logger if new_site_dir apply_after_new_command new_site_dir else apply_in_pwd end rescue SystemExit => e @logger.error "Problem occurred while running automation:" e.backtrace[0..3].each do |backtrace_line| @logger.info backtrace_line if backtrace_line.include?(":in `apply'") end raise e end |