Skip to content

Commit e79c5f7

Browse files
authored
Pull request 1564 (#205)
* pull request 1539 * pull request 1300 * pull request 1564 * adapted rakefile
1 parent c9e6762 commit e79c5f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Rakefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
namespace :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.

0 commit comments

Comments
 (0)