File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11namespace :book do
2+ def exec_or_raise ( command )
3+ puts `#{ command } `
4+ if ( ! $?. success? )
5+ raise "'#{ command } ' failed"
6+ end
7+ end
8+
29 desc 'build basic book formats'
310 task :build do
411
@@ -16,10 +23,14 @@ namespace :book do
1623 `bundle exec asciidoctor #{ params } -a data-uri progit.asc`
1724 puts " -- HTML output at progit.html"
1825
26+ exec_or_raise ( 'htmlproofer --check-html progit.html' )
27+
1928 puts "Converting to EPub..."
2029 `bundle exec asciidoctor-epub3 #{ params } progit.asc`
2130 puts " -- Epub output at progit.epub"
2231
32+ exec_or_raise ( 'epubcheck progit.epub' )
33+
2334 # Commented out the .mobi file creation because the kindlegen dependency is not available.
2435 # For more information on this see: #1496.
2536 # This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.
You can’t perform that action at this time.
0 commit comments