work-around a problem with running build in an extension

master
Tom Vaughan 2013-07-16 21:24:45 -04:00
parent 3b9b8093d3
commit f0a60edf29
1 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,11 @@ module Middleman
else
build_before = self.deploy_options.build_before
end
Middleman::Cli::Build.new.build if build_before
if build_before
# http://forum.middlemanapp.com/t/problem-with-the-build-task-in-an-extension
builder = ::Middleman::Cli::Build.new(args=[], options={:instrument=>false})
builder.build
end
send("deploy_#{self.deploy_options.method}")
end