Merge remote-tracking branch 'origin/3.0-stable'
Conflicts: CHANGELOG.md middleman-core/lib/middleman-core/cli/build.rb middleman-core/lib/middleman-core/core_extensions/rendering.rb middleman-core/lib/middleman-core/preview_server.rb middleman-core/lib/middleman-core/renderers/sass.rb middleman-core/lib/middleman-core/sitemap/store.rb middleman-core/lib/middleman-core/util.rb middleman-core/lib/middleman-core/version.rb middleman-more/lib/middleman-more/core_extensions/compass.rb middleman-more/lib/middleman-more/core_extensions/default_helpers.rb middleman-more/lib/middleman-more/extensions/asset_hash.rb
This commit is contained in:
commit
c0c14f4eab
15 changed files with 122 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
require "middleman-core"
|
||||
require "fileutils"
|
||||
|
||||
# CLI Module
|
||||
module Middleman::Cli
|
||||
|
@ -64,7 +65,9 @@ module Middleman::Cli
|
|||
action GlobAction.new(self, opts)
|
||||
|
||||
if @had_errors && !@debugging
|
||||
self.shell.say "There were errors during this build, re-run with --verbose to see the full exception."
|
||||
cmd = "middleman build --verbose"
|
||||
cmd = "bundle exec '#{cmd}'" if defined?(Bundler)
|
||||
self.shell.say "There were errors during this build, re-run with `#{cmd}` to see the full exception."
|
||||
end
|
||||
|
||||
exit(1) if @had_errors
|
||||
|
@ -118,7 +121,17 @@ module Middleman::Cli
|
|||
output_file = File.join(build_dir, resource.destination_path)
|
||||
|
||||
if resource.binary?
|
||||
copy_file(resource.source_file, output_file)
|
||||
if !File.exists?(output_file)
|
||||
say_status :create, output_file, :green
|
||||
elsif FileUtils.compare_file(resource.source_file, output_file)
|
||||
say_status :identical, output_file, :blue
|
||||
return output_file
|
||||
else
|
||||
say_status :update, output_file, :yellow
|
||||
end
|
||||
|
||||
FileUtils.mkdir_p(File.dirname(output_file))
|
||||
FileUtils.cp(resource.source_file, output_file)
|
||||
else
|
||||
begin
|
||||
response = self.class.shared_rack.get(URI.escape(resource.destination_path))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue