@@ -37,7 +37,7 @@ namespace :book do
3737 end
3838
3939 desc 'build basic book formats'
40- task :build => [ :build_html , :build_epub , :build_pdf ] do
40+ task :build => [ :build_html , :build_epub , :build_mobi , : build_pdf] do
4141 begin
4242 # Run check
4343 Rake ::Task [ 'book:check' ] . invoke
@@ -50,7 +50,7 @@ namespace :book do
5050 end
5151
5252 desc 'build basic book formats (for ci)'
53- task :ci => [ :build_html , :build_epub , :build_pdf ] do
53+ task :ci => [ :build_html , :build_epub , :build_mobi , : build_pdf] do
5454 # Run check, but don't ignore any errors
5555 Rake ::Task [ 'book:check' ] . invoke
5656 end
@@ -84,18 +84,11 @@ namespace :book do
8484
8585 desc 'build Mobi format'
8686 task :build_mobi => 'book/contributors.txt' do
87- # Commented out the .mobi file creation because the kindlegen dependency is not available.
88- # For more information on this see: #1496.
89- # This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.
90-
91- # puts "Converting to Mobi (kf8)..."
92- # `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
93- # puts " -- Mobi output at progit.mobi"
94-
95- # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below
96- puts "Converting to Mobi isn't supported yet."
97- puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496."
98- exit ( 127 )
87+ check_contrib ( )
88+
89+ puts "Converting to Mobi (kf8)..."
90+ `bundle exec asciidoctor-epub3 #{ params } -a ebook-format=kf8 progit.asc`
91+ puts " -- Mobi output at progit.mobi"
9992 end
10093
10194 desc 'build PDF format'
@@ -120,7 +113,7 @@ namespace :book do
120113 begin
121114 puts 'Removing generated files'
122115
123- FileList [ 'book/contributors.txt' , 'progit.html' , 'progit.epub' , 'progit.pdf' ] . each do |file |
116+ FileList [ 'book/contributors.txt' , 'progit.html' , 'progit.epub' , 'progit.mobi' , 'progit. pdf'] . each do |file |
124117 rm file
125118
126119 # Rescue if file not found
0 commit comments