File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ def compile
106106 post_bundler
107107 create_database_yml
108108 install_binaries
109+ run_swagger_docs_rake_task
109110 run_assets_precompile_rake_task
110111 end
111112 best_practice_warnings
@@ -846,6 +847,28 @@ def yarn_not_preinstalled?
846847 !yarn_preinstall_bin_path
847848 end
848849
850+ def run_swagger_docs_rake_task
851+ instrument 'ruby.run_swagger_docs_rake_task' do
852+
853+ docs = rake . task ( "swagger:docs" )
854+ return true unless docs . is_defined?
855+
856+ topic "Generating Swagger documentation"
857+ docs . invoke ( env : rake_env )
858+ if docs . success?
859+ puts "Swagger documentation generation completed (#{ "%.2f" % docs . time } s)"
860+ else
861+ swagger_docs_fail ( docs . output )
862+ end
863+ end
864+ end
865+
866+ def swagger_docs_fail ( output )
867+ log "swagger_docs" , :status => "failure"
868+ msg = "Generating Swagger documentation failed.\n "
869+ error msg
870+ end
871+
849872 def run_assets_precompile_rake_task
850873 instrument 'ruby.run_assets_precompile_rake_task' do
851874
You can’t perform that action at this time.
0 commit comments