From 85a18e28e58ce2d4ee4804c838254e5478f00618 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Fri, 4 Sep 2015 15:07:23 -0400 Subject: [PATCH] Use latest version of GitPython --- scripts/release.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 84aeb1123b..867d11338e 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -22,7 +22,7 @@ try: import yaml except ImportError: print("Error: missing dependencies! Please run this command to install them:") - print("pip install path.py requests python-dateutil GitPython==0.3.2.RC1 PyYAML") + print("pip install path.py requests python-dateutil GitPython PyYAML") sys.exit(1) try: @@ -32,7 +32,16 @@ except ImportError: JIRA_RE = re.compile(r"\b[A-Z]{2,}-\d+\b") PR_BRANCH_RE = re.compile(r"remotes/edx/pr/(\d+)") -PROJECT_ROOT = path(__file__).abspath().dirname() + + +def project_root(): + directory = path(__file__).abspath().dirname() + while not (directory / ".git").exists(): + directory = directory.parent + return directory + + +PROJECT_ROOT = project_root() repo = Repo(PROJECT_ROOT) git = repo.git