Fail if site generation fails

This commit is contained in:
Paulus Schoutsen 2016-12-06 23:00:48 -08:00
parent 0207fd41a0
commit caed5e9697

View File

@ -56,8 +56,10 @@ desc "Generate jekyll site"
task :generate do
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
puts "## Generating Site with Jekyll"
system "compass compile --css-dir #{source_dir}/stylesheets"
system "jekyll build"
success = system "compass compile --css-dir #{source_dir}/stylesheets"
abort("Generating CSS failed") unless success
success = system "jekyll build"
abort("Generating site failed") unless success
end
desc "Watch the site and regenerate when it changes"