From 15bdb076c86bd71e7c95944b6e6b89f32556e5e6 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Tue, 15 Jun 2021 17:10:34 +0200 Subject: [PATCH] hotfix - fix docs get_git_branch --- docs/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 11fe24c..6b077bf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,7 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) -import os +import os, subprocess, re def get_git_branch(): """Get the git branch this repository is currently on""" @@ -26,7 +26,7 @@ def get_git_branch(): # This will contain something like "* (HEAD detached at origin/MYBRANCH)" # or something like "* MYBRANCH" - branch_output = p.communicate()[0] + branch_output = p.communicate()[0].decode("ascii") # This is if git is in a normal branch state match = re.search(r'\* (?P[^\(\)\n ]+)', branch_output) @@ -37,20 +37,20 @@ def get_git_branch(): match = re.search(r'\(HEAD detached at origin/(?P[^\)]+)\)', branch_output) if match: return match.groupdict()['branch_name'] - except Exception: + except Exception as e : + print(e) print(u'Could not get the branch') # Couldn't figure out the branch probably due to an error return None # -- Project information ----------------------------------------------------- - project = 'bunkerized-nginx' copyright = '2021, bunkerity' author = 'bunkerity' # The full version, including alpha/beta/rc tags -release = 'v1.2.6' +release = 'v1.2.7' # -- General configuration ---------------------------------------------------