Skip to content

Commit 2d06e8d

Browse files
Parse Git Revision via Subprocess Call
For some reason Raven doesn't seem to be retrieving the Git revision as intended, so let's revert it back to the way it was working with before. Fixes #137
1 parent 0f9073d commit 2d06e8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

conditional/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
app.config.from_pyfile(config)
1818
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
1919

20-
try:
21-
app.config["GIT_REVISION"] = fetch_git_sha(app.config["ROOT_DIR"])[:7]
22-
except (InvalidGitRepository, KeyError):
23-
app.config["GIT_REVISION"] = "unknown"
20+
app.config["GIT_REVISION"] = subprocess.check_output(['git',
21+
'rev-parse',
22+
'--short',
23+
'HEAD']).decode('utf-8').rstrip()
2424

2525

2626
db = SQLAlchemy(app)

0 commit comments

Comments
 (0)