Commit 4811e736 by Alexander Kryklia

enabled rake docs for ubuntu

parent 89527281
......@@ -169,7 +169,7 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
TEST_TASK_DIRS << lib
desc "Run tests for common lib #{lib} (without coverage)"
task "fasttest_#{lib}" do
task "fasttest_#{lib}" do
sh("nosetests #{lib}")
end
......@@ -309,16 +309,22 @@ task :builddocs do
end
end
desc "Show doc in browser (mac only for now) TODO add linux support"
desc "Show docs in browser (mac and ubuntu)."
task :showdocs do
Dir.chdir('docs/build/html') do
sh('open index.html')
if RUBY_PLATFORM.include? 'darwin' # mac os
sh('open index.html')
elsif RUBY_PLATFORM.include? 'linux' # make more ubuntu specific?
sh('sens-browser index.html') # ubuntu
else
raise "\nUndefined how to run browser on your machine.
Please use 'rake builddocs' and then manually open
'mitx/docs/build/html/index.html."
end
end
end
desc "Build docs and show them in browser"
task :doc => :builddocs do
Dir.chdir('docs/build/html') do
sh('open index.html')
end
Rake::Task["showdocs"].invoke
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment