From 58de32b978ad07a104b751ccf2ba87f8e9b9dc6e Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Wed, 2 Jul 2014 13:00:38 +0000 Subject: [PATCH] Don't crash docs build if `git tag` fails For some reason `git tag -l` seems to be outputting nothing on Travis, which makes the docs build crash on Travis. Instead of crashing just use an empty string for the CKAN version, which will break the docs but no one reads the docs that Travis builds anyway. --- doc/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index c78c58308ec..3e1bbab3b7f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -166,13 +166,13 @@ def latest_release_tag(): # FIXME: We could do more careful pattern matching against ckan-X.Y.Z here. release_tags = [tag for tag in git_tags if tag.startswith('ckan-')] - assert release_tags, git_tags - # git tag -l prints out the tags in the right order anyway, but don't rely # on that, sort them again here for good measure. release_tags.sort() - return release_tags[-1] + if release_tags: + return release_tags[-1] + else return '' def latest_release_version():