forked from openshift/openshift-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
20 lines (19 loc) · 1005 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'ascii_binder/tasks/tasks'
task :import_api do
sh "pushd ../origin && hack/gen-swagger-docs.sh" do |ok,res|
fail "Unable to generate docs" if !ok
end
sh "cp ../origin/_output/local/docs/swagger/api/v1/overview.adoc rest_api/kubernetes_v1.adoc" do |ok,res|
fail "Unable to copy latest kubernetes v1 docs" if !ok
end
sh "cat ../origin/_output/local/docs/swagger/api/v1/{paths,definitions}.adoc >> rest_api/kubernetes_v1.adoc" do |ok,res|
fail "Unable to concat latest kubernetes v1 docs" if !ok
end
sh "cp ../origin/_output/local/docs/swagger/oapi/v1/overview.adoc rest_api/openshift_v1.adoc" do |ok,res|
fail "Unable to copy latest openshift v1 docs" if !ok
end
sh "cat ../origin/_output/local/docs/swagger/oapi/v1/{paths,definitions}.adoc >> rest_api/openshift_v1.adoc" do |ok,res|
fail "Unable to concat latest openshift v1 docs" if !ok
end
puts "\nNOTE: You must edit rest_api/kubernetes_v1.adoc and rest_api/openshift_v1.adoc to add TOC metadata"
end