Skip to content

Commit

Permalink
Fix the fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gal Topper committed Dec 30, 2020
1 parent fee4835 commit 4ac355b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions set-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ def set_version():
version = environ.get('GITHUB_REF')
assert version, 'GITHUB_REF is not defined'

version = version.replace('refs-tags-v', '')
version = version.replace('refs/tags/v', '')

lines = []
init_py = 'storey/__init__.py'
with open(init_py) as fp:
for line in fp:
if '__version__' in line:
line = "__version__ = '{}'\n".format(version)
line = f"__version__ = '{version}'\n"
lines.append(line)

with open(init_py, 'w') as out:
Expand Down

0 comments on commit 4ac355b

Please sign in to comment.