mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
tasks: enable rake docs to open on macOS
The `xdg-open` command is not available on macOS. macOS uses the `open` command. Add info to install doxygen on macOS with Homebrew. https://formulae.brew.sh/formula/doxygen
This commit is contained in:
+12
-2
@@ -22,6 +22,8 @@ namespace :doc do
|
||||
puts " $ sudo apt-get install doxygen"
|
||||
puts "On RHEL-based systems:"
|
||||
puts " $ sudo dnf install doxygen"
|
||||
puts "On macOS-based systems:"
|
||||
puts " $ brew install doxygen"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -43,12 +45,20 @@ namespace :doc do
|
||||
namespace :view do
|
||||
desc 'open yard docs'
|
||||
task :api do
|
||||
sh 'xdg-open doc/api/index.html'
|
||||
if RUBY_PLATFORM.include?('darwin')
|
||||
sh 'open doc/api/index.html'
|
||||
else
|
||||
sh 'xdg-open doc/api/index.html'
|
||||
end
|
||||
end
|
||||
|
||||
desc 'open doxygen docs'
|
||||
task :capi do
|
||||
sh 'xdg-open doc/capi/html/index.html'
|
||||
if RUBY_PLATFORM.include?('darwin')
|
||||
sh 'open doc/capi/html/index.html'
|
||||
else
|
||||
sh 'xdg-open doc/capi/html/index.html'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user