Unverified Commit 1cc1ade6 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5263 from shuujii/use-namespaces-according-to-Rake-conventions

Use namespaces according to Rake conventions
parents 76241a96 0dfcaaed
desc 'generate document'
task :doc => [:api_doc, :capi_doc] do
task :doc => %w[doc:api doc:capi]
end
desc 'generate yard docs'
task :api_doc do
namespace :doc do
desc 'generate yard docs'
task :api do
begin
sh "mrbdoc"
rescue
puts "ERROR: To generate yard documentation, you should install yard-mruby gem."
puts " $ gem install yard-mruby yard-coderay"
end
end
end
desc 'generate doxygen docs'
task :capi_doc do
desc 'generate doxygen docs'
task :capi do
begin
sh "doxygen Doxyfile"
rescue
puts "ERROR: To generate C API documents, you need Doxygen."
puts " $ sudo apt-get install doxygen"
end
end
end
desc 'clean all built docs'
task :clean => %w[clean:api clean:capi]
desc 'clean all built docs'
task :clean_api_doc do
namespace :clean do
desc 'clean yard docs'
task :api do
rm_rf 'doc/api'
end
end
desc 'clean all built docs'
task :clean_capi_doc do
desc 'clean doxygen docs'
task :capi do
rm_rf 'doc/capi'
end
desc 'clean all built docs'
task :clean_doc => [:clean_api_doc, :clean_capi_doc] do
end
end
end
desc 'clean all built docs'
task :view_api => [:api_doc] do
namespace :view do
desc 'open yard docs'
task :api do
sh 'xdg-open doc/api/index.html'
end
end
desc 'clean all built docs'
task :view_capi => [:capi_doc] do
desc 'open doxygen docs'
task :capi do
sh 'xdg-open doc/capi/html/index.html'
end
end
end
# deprecated
task "api_doc" => "doc:api"
task "capi_doc" => "doc:capi"
task "clean_doc" => "doc:clean"
task "clean_api_doc" => "doc:clean:api"
task "clean_capi_doc" => "doc:clean:capi"
task "view_api" => "doc:view:api"
task "view_capi" => "doc:view:capi"
......@@ -25,8 +25,9 @@ def run_cmd(cmd)
raise 'error' unless system cmd
end
desc 'recreate docker images for GitLab builds'
task :gitlab_dockers do
namespace :gitlab do
desc 'recreate docker images for GitLab builds'
task :dockers do
CI_COMPILERS.each do |compiler|
tag = ci_image_tag(compiler)
filename = "Dockerfile.#{tag}"
......@@ -54,10 +55,10 @@ task :gitlab_dockers do
run_cmd cmd2
File.delete(filename)
end
end
end
desc 'create build configurations and update .gitlab-ci.yml'
task :gitlab_config do
desc 'create build configurations and update .gitlab-ci.yml'
task :config do
require 'yaml'
configs = []
......@@ -112,4 +113,9 @@ task :gitlab_config do
end
end
File.open(path, 'w') { |f| YAML.dump(data, f) }
end
end
# deprecated
task "gitlab_config" => "gitlab:config"
task "gitlab_dockers" => "gitlab:dockers"
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