@@ -38,7 +38,7 @@ namespace :book do
3838
3939 # Tasks list
4040 desc 'build basic book formats'
41- task :build => [ :build_html , :build_epub , :build_pdf ] do
41+ task :build => [ :build_html , :build_epub , :build_mobi , : build_pdf] do
4242 begin
4343 puts 'Validating generated files...'
4444 Rake ::Task [ 'book:check' ] . invoke
@@ -75,18 +75,9 @@ namespace :book do
7575 task :build_mobi do
7676 Rake ::Task [ 'book:prebuild' ] . invoke ( 96 )
7777
78- # Commented out the .mobi file creation because the kindlegen dependency is not available.
79- # For more information on this see: #1496.
80- # This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.
81-
82- # puts "Converting to Mobi (kf8)..."
83- # `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
84- # puts " -- Mobi output at progit.mobi"
85-
86- # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below
87- puts "Converting to Mobi isn't supported yet."
88- puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496."
89- exit ( 127 )
78+ puts 'Converting to Mobi (kf8)...'
79+ `bundle exec asciidoctor-epub3 #{ params } -a ebook-format=kf8 progit.asc`
80+ puts ' -- Mobi output at progit.mobi'
9081 end
9182
9283 desc 'build PDF format'
@@ -126,7 +117,7 @@ namespace :book do
126117 begin
127118 puts 'Removing downloaded and generated files'
128119
129- FileList [ locale_file , 'book/contributors.txt' , 'progit.html' , 'progit.epub' , 'progit.pdf' ] . each do |file |
120+ FileList [ locale_file , 'book/contributors.txt' , 'progit.html' , 'progit.epub' , 'progit.pdf' , 'progit.mobi' ] . each do |file |
130121 rm file
131122 rescue Errno ::ENOENT
132123 end
0 commit comments