Skip to content

Commit

Permalink
Merge pull request #18 from lnls-sirius/pnallin-hash-library
Browse files Browse the repository at this point in the history
Bug correction: commit hash at library version
  • Loading branch information
pnallin committed Aug 7, 2019
2 parents d01ad24 + 78f6406 commit b2aea6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/library/PRUserial485/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
from .implementation import *

PYTHON3 = "3"
PRUserial485_files_path = "/root/pru-serial485"

if(sys.version[0] == PYTHON3):
# Needed only for Python3
def _get_last_commit_hash():
"""Get commit Hash of the repository of the calling file."""
fname = _os.path.realpath(_inspect.stack()[1][1])
path = fname.rpartition(_os.path.sep)[0]
#path = fname.rpartition(_os.path.sep)[0]
path = PRUserial485_files_path
pwd = _os.path.abspath('.')
return _sp.getoutput('cd ' + path +
'; git log --format=%h -1; cd ' + pwd)
Expand Down

0 comments on commit b2aea6c

Please sign in to comment.