Apply tags from the python

This commit is contained in:
Ayaz Salikhov
2021-03-20 21:02:21 +03:00
parent 9fe5186aba
commit ffbe758e54
5 changed files with 134 additions and 1 deletions

19
tagging/git_helper.py Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python3
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from plumbum.cmd import git
class GitHelper:
@staticmethod
def commit_hash():
return git['rev-parse', 'HEAD']().strip()
@staticmethod
def commit_message():
return git["log", -1, "--pretty=%B"]().strip()
if __name__ == '__main__':
print('Git hash:', GitHelper.commit_hash())
print('Git message:', GitHelper.commit_message())