Don't error when composing the build number on non Git deploys.

This commit is contained in:
Roberto Rosario
2015-10-07 03:48:32 -04:00
parent a76a8b7e0a
commit 677d28b015

View File

@@ -70,6 +70,9 @@ def render_subtemplate(context, template_name, template_context):
@register.assignment_tag
def build():
if BUILD:
return '{} {}'.format(BUILD(), DATE().decode())
try:
return '{} {}'.format(BUILD(), DATE().decode())
except sh.ErrorReturnCode_128:
return ''
else:
return 'No build information'
return ''