X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9456885954b0bff02721bbb14da296be212efdc4..be671e455b11f50af965923b980977264a8d7364:/doc/Rakefile diff --git a/doc/Rakefile b/doc/Rakefile index ab5a2ea5e2..4870eb19e2 100644 --- a/doc/Rakefile +++ b/doc/Rakefile @@ -1,9 +1,12 @@ #!/usr/bin/env rake +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: CC-BY-SA-3.0 require "rubygems" require "colorize" -task :generate => [ :realclean, 'sdk/python/arvados/index.html' ] do +task :generate => [ :realclean, 'sdk/python/arvados/index.html', 'sdk/R/arvados/index.html' ] do vars = ['baseurl', 'arvados_api_host', 'arvados_workbench_host'] vars.each do |v| if ENV[v] @@ -22,6 +25,19 @@ file "sdk/python/arvados/index.html" do |t| end end +file "sdk/R/arvados/index.html" do |t| + `which R` + if $? == 0 + Dir.chdir("../sdk/R/") do + STDERR.puts `Rscript createDoc.R README.Rmd index.html 2>&1` + end + raise if $? != 0 + cp_r("../sdk/R/README.html", "sdk/R/") + else + puts "Warning: R not found, R documentation will not be generated".colorize(:light_red) + end +end + task :linkchecker => [ :generate ] do Dir.chdir(".site") do `which linkchecker` @@ -35,6 +51,8 @@ end task :clean do rm_rf "sdk/python/arvados" + rm_rf "sdk/R/arvados" + rm_rf "../sdk/R/docs" end require "zenweb/tasks"