The build string is now part of the mayan package metadata. Update forum link. Add instagram link.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -2,8 +2,6 @@ from __future__ import unicode_literals
|
||||
|
||||
from json import dumps
|
||||
|
||||
import sh
|
||||
|
||||
from django.template import Context, Library
|
||||
from django.template.loader import get_template
|
||||
from django.utils.encoding import force_text
|
||||
@@ -16,24 +14,6 @@ from ..utils import check_for_sqlite, return_attrib
|
||||
|
||||
register = Library()
|
||||
|
||||
try:
|
||||
BUILD = sh.Command('git').bake('describe', '--tags', '--always', 'HEAD')
|
||||
DATE = sh.Command('git').bake('--no-pager', 'log', '-1', '--format=%cd')
|
||||
except sh.CommandNotFound:
|
||||
BUILD = None
|
||||
DATE = None
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def build():
|
||||
if BUILD:
|
||||
try:
|
||||
return '{} {}'.format(BUILD(), DATE())
|
||||
except sh.ErrorReturnCode_128:
|
||||
return ''
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def check_sqlite():
|
||||
|
||||
Reference in New Issue
Block a user