8784: Fix test for latest firefox.
[arvados.git] / doc / Rakefile
1 #!/usr/bin/env rake
2
3 require "rubygems"
4 require "colorize"
5
6 task :generate => [ :realclean, 'sdk/python/arvados/index.html' ] do
7   vars = ['baseurl', 'arvados_api_host', 'arvados_workbench_host']
8   vars.each do |v|
9     if ENV[v]
10       website.config.h[v] = ENV[v]
11     end
12   end
13 end
14
15 file "sdk/python/arvados/index.html" do |t|
16   `which epydoc`
17   if $? == 0
18     STDERR.puts `epydoc --html --parse-only -o sdk/python/arvados ../sdk/python/arvados/ 2>&1`
19     raise if $? != 0
20   else
21     puts "Warning: epydoc not found, Python documentation will not be generated".colorize(:light_red)
22   end
23 end
24
25 task :linkchecker => [ :generate ] do
26   Dir.chdir(".site") do
27     `which linkchecker`
28     if $? == 0
29       system "linkchecker index.html --ignore-url='!file://'" or exit $?.exitstatus
30     else
31       puts "Warning: linkchecker not found, skipping run".colorize(:light_red)
32     end
33   end
34 end
35
36 task :clean do
37   rm_rf "sdk/python/arvados"
38 end
39
40 require "zenweb/tasks"
41 load "zenweb-textile.rb"
42 load "zenweb-liquid.rb"
43
44 task :extra_wirings do
45   $website.pages["sdk/python/python.html.textile.liquid"].depends_on("sdk/python/arvados/index.html")
46 end