Skip to content

Commit

Permalink
version file will not be there if run as Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
crosenth committed Jul 1, 2024
1 parent e967dda commit ddcd8b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
f'|| rm -f {version_file}.tmp'),
shell=True, stderr=open(os.devnull, "w"))

with open(version_file) as f:
version = f.read().strip().lstrip('v').replace(
'-', '+', 1).replace('-', '.')
try:
with open(version_file) as f:
version = f.read().strip().lstrip('v').replace(
'-', '+', 1).replace('-', '.')
except Exception as e:
version = ''


class CheckVersion(Command):
Expand Down

0 comments on commit ddcd8b8

Please sign in to comment.