@@ -7,7 +7,7 @@ namespace :book do
7
7
end
8
8
9
9
# Variables referenced for build
10
- version_string = ENV [ 'TRAVIS_TAG' ] || `git describe --tags` . chomp
10
+ version_string = `git describe --tags` . chomp
11
11
if version_string . empty?
12
12
version_string = '0'
13
13
end
@@ -37,7 +37,7 @@ namespace :book do
37
37
end
38
38
39
39
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
41
41
begin
42
42
# Run check
43
43
Rake ::Task [ 'book:check' ] . invoke
@@ -50,7 +50,7 @@ namespace :book do
50
50
end
51
51
52
52
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
54
54
# Run check, but don't ignore any errors
55
55
Rake ::Task [ 'book:check' ] . invoke
56
56
end
@@ -84,18 +84,11 @@ namespace :book do
84
84
85
85
desc 'build Mobi format'
86
86
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"
99
92
end
100
93
101
94
desc 'build PDF format'
@@ -120,7 +113,7 @@ namespace :book do
120
113
begin
121
114
puts 'Removing generated files'
122
115
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 |
124
117
rm file
125
118
126
119
# Rescue if file not found
0 commit comments