lib/nanoc/cli/commands/deploy.rb in nanoc-4.8.3 vs lib/nanoc/cli/commands/deploy.rb in nanoc-4.8.4
- old
+ new
@@ -13,11 +13,11 @@
option :n, :'dry-run', 'show what would be deployed'
module Nanoc::CLI::Commands
class Deploy < ::Nanoc::CLI::CommandRunner
def run
- load_site(preprocess: true)
+ @site = load_site(preprocess: true)
if options[:'list-deployers']
list_deployers
elsif options[:list]
list_deploy_configs
@@ -78,18 +78,18 @@
end
end
def deployer_for(config)
deployer_class_for_config(config).new(
- site.config[:output_dir],
+ @site.config[:output_dir],
config,
dry_run: options[:'dry-run'],
)
end
def check
- runner = Nanoc::Checking::Runner.new(site)
+ runner = Nanoc::Checking::Runner.new(@site)
if runner.dsl_present?
puts 'Running issue checks…'
is_success = runner.run_for_deploy
if is_success
puts 'No issues found. Deploying!'
@@ -101,10 +101,10 @@
true
end
end
def deploy_configs
- site.config.fetch(:deploy, {})
+ @site.config.fetch(:deploy, {})
end
def deployer_class_for_config(config)
name = config.fetch(:kind) do
$stderr.puts 'Warning: The specified deploy target does not have a kind attribute. Assuming rsync.'