Skip to content

Commit

Permalink
Don't crash docs build if git tag fails
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
seanh committed Jul 2, 2014
1 parent c0ed145 commit 58de32b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/conf.py
Expand Up @@ -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():
Expand Down

0 comments on commit 58de32b

Please sign in to comment.