Fail if site generation fails
This commit is contained in:
parent
0207fd41a0
commit
caed5e9697
1 changed files with 4 additions and 2 deletions
6
Rakefile
6
Rakefile
|
|
@ -56,8 +56,10 @@ desc "Generate jekyll site"
|
||||||
task :generate do
|
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)
|
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"
|
puts "## Generating Site with Jekyll"
|
||||||
system "compass compile --css-dir #{source_dir}/stylesheets"
|
success = system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||||
system "jekyll build"
|
abort("Generating CSS failed") unless success
|
||||||
|
success = system "jekyll build"
|
||||||
|
abort("Generating site failed") unless success
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Watch the site and regenerate when it changes"
|
desc "Watch the site and regenerate when it changes"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue