Skip to content

Commit 2ddf197

Browse files
authored
Fix broken .mobi build
1 parent 5eb9b0c commit 2ddf197

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Rakefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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,6 +84,8 @@ namespace :book do
8484

8585
desc 'build Mobi format'
8686
task :build_mobi => 'book/contributors.txt' do
87+
check_contrib()
88+
8789
puts "Converting to Mobi (kf8)..."
8890
`bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
8991
puts " -- Mobi output at progit.mobi"
@@ -111,7 +113,7 @@ namespace :book do
111113
begin
112114
puts 'Removing generated files'
113115

114-
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|
115117
rm file
116118

117119
# Rescue if file not found

0 commit comments

Comments
 (0)