Skip to content

Commit

Permalink
Update version.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rcervinoucm authored May 24, 2024
1 parent 29fe367 commit e35e116
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ctlearn/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ def find_git_on_windows():

def get_git_describe_version(abbrev=7):
"""return the string output of git desribe"""
print('hola3')
try:
with open(devnull, "w") as fnull:
arguments = [GIT_COMMAND, "describe", "--tags", "--abbrev=%d" % abbrev]
print(CURRENT_DIRECTORY)
return (
check_output(arguments, cwd=CURRENT_DIRECTORY, stderr=fnull)
.decode("ascii")
Expand Down Expand Up @@ -115,6 +117,7 @@ def format_git_describe(git_str, pep440=False):

def read_release_version():
"""Read version information from VERSION file"""
print(VERSION_FILE)
if not path.exists(VERSION_FILE):
return "unknown"
with open(VERSION_FILE) as f:
Expand Down Expand Up @@ -160,6 +163,7 @@ def get_version(pep440=False):
"""
print('hola')
raw_git_version = get_git_describe_version()
print(raw_git_version)
if not raw_git_version: # not a git repository
return read_release_version()
print(raw_git_version)
Expand Down

0 comments on commit e35e116

Please sign in to comment.