Skip to content

Commit

Permalink
Invoke :check task inside :build
Browse files Browse the repository at this point in the history
Instead of invoking :check as dependency, explicitly invoke it inside
the body of :build.

As suggested by @jnavila, any errors raised from :check should not cause
FTBFS, thus ignore them.

Signed-off-by: Bagas Sanjaya <[email protected]>
  • Loading branch information
bagasme committed Jan 28, 2021
1 parent 6e4a261 commit 1374429
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ namespace :book do
params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'"

desc 'build basic book formats'
task :build => [:build_html, :build_epub, :build_pdf, :check]
task :build => [:build_html, :build_epub, :build_pdf] do
begin
# Run check
Rake::Task["book:check"].invoke

# Rescue to ignore checking errors
rescue => e
puts e.message
puts "Error when checking books (ignored)"
end
end

desc 'generate contributors list'
file 'book/contributors.txt' do
Expand Down

0 comments on commit 1374429

Please sign in to comment.