-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (26 loc) · 894 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
filename = 'the_road_from_java8_to_java11'
version = `git describe`
date = Time.now.strftime("%Y-%m-%d")
params = "--attribute revnumber='#{version}' --attribute revdate='#{date}' --failure-level WARN"
task :html do
begin
puts "Converting to HTML..."
system "bundle exec asciidoctor #{params} --out-file #{filename}.html main.adoc" or raise
puts " -- HTML output at #{filename}.html"
end
end
task :pdf do
begin
puts "Converting to PDF... "
system "bundle exec asciidoctor-pdf #{params} --out-file #{filename}.pdf main.adoc" or raise
puts " -- PDF output at #{filename}.pdf"
end
end
task :check do
begin
system "bundle exec awesome_bot --white-list 'http://0.0.0.0:80,http://localhost,https://www.oracle.com' --allow-redirect --skip-save-results main.adoc" or raise
end
end
task build: [:pdf, :html]
task all: [:check, :build]
task :default => :all