lib/nanoc/cli/commands/deploy.rb in nanoc-3.7.3 vs lib/nanoc/cli/commands/deploy.rb in nanoc-3.7.4
- old
+ new
@@ -1,17 +1,17 @@
# encoding: utf-8
-usage 'deploy [options]'
-summary 'deploy the compiled site'
+usage 'deploy [options]'
+summary 'deploy the compiled site'
description "
Deploys the compiled site. The compiled site contents in the output directory will be uploaded to the destination, which is specified using the `--target` option.
"
option :t, :target, 'specify the location to deploy to (default: `default`)', :argument => :required
-flag :C, :'no-check', 'do not run the issue checks marked for deployment'
-flag :L, :list, 'list available locations to deploy to'
-flag :D, :'list-deployers', 'list available deployers'
+flag :C, :'no-check', 'do not run the issue checks marked for deployment'
+flag :L, :list, 'list available locations to deploy to'
+flag :D, :'list-deployers', 'list available deployers'
option :n, :'dry-run', 'show what would be deployed'
module Nanoc::CLI::Commands
class Deploy < ::Nanoc::CLI::CommandRunner
@@ -33,11 +33,11 @@
# Get & list configs
deploy_configs = site.config.fetch(:deploy, {})
if options[:list]
if deploy_configs.empty?
- puts 'No deployment configurations.'
+ puts 'No deployment configurations.'
else
puts 'Available deployment configurations:'
deploy_configs.keys.each do |name|
puts " #{name}"
end
@@ -68,13 +68,13 @@
end
# Check
unless options[:'no-check']
runner = Nanoc::Extra::Checking::Runner.new(site)
- if runner.has_dsl?
+ if runner.dsl_present?
puts 'Running issue checks…'
ok = runner.run_for_deploy
- if !ok
+ unless ok
puts 'Issues found, deploy aborted.'
return
end
puts 'No issues found. Deploying!'
end