Skip to content

Commit

Permalink
Put search step back into project build task (#4655)
Browse files Browse the repository at this point in the history
It got removed a bit early and if we don't set an outcome, search files
aren't synced correctly.

Refs #4638
  • Loading branch information
agjohnson authored Sep 25, 2018
1 parent 36dea4f commit 68c3a89
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 68c3a89

Please sign in to comment.