From caed5e96971d8c20bb909c1eb0a92bbfb63e3245 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 6 Dec 2016 23:00:48 -0800 Subject: [PATCH] Fail if site generation fails --- Rakefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 29e0cbe5b80..e44380c49dc 100644 --- a/Rakefile +++ b/Rakefile @@ -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"