From d099f3a4ce49beff3d0610cb5f22a4b83735a3c9 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Thu, 20 Sep 2018 13:57:03 -0600 Subject: [PATCH] Put search step back into project build task It got removed a bit early and if we don't set an outcome, search files aren't synced correctly. Refs #4638 --- readthedocs/projects/tasks.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py index d5db9297c32..3c1d2bb0770 100644 --- a/readthedocs/projects/tasks.py +++ b/readthedocs/projects/tasks.py @@ -692,6 +692,7 @@ def build_docs(self): version=self.version, max_lock_age=getattr(settings, 'REPO_LOCK_SECONDS', 30)): outcomes['html'] = self.build_docs_html() + outcomes['search'] = self.build_docs_search() outcomes['localmedia'] = self.build_docs_localmedia() outcomes['pdf'] = self.build_docs_pdf() outcomes['epub'] = self.build_docs_epub() @@ -723,6 +724,14 @@ def build_docs_html(self): return success + def build_docs_search(self): + """Build search data.""" + # TODO rely on config parameter here when Project.documentation_type is + # removed in #4638. Mkdocs has no search currently + if self.project.documentation_type == 'mkdocs': + return False + return self.build_search + def build_docs_localmedia(self): """Get local media files with separate build.""" if 'htmlzip' not in self.config.formats: