Skip to content

Commit

Permalink
more robust approach to infer the version
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Dec 1, 2023
1 parent 7768b25 commit b522dbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
bump_version = (this_directory / ".bumpversion.toml").read_text()
version = bump_version.split("\n")[0].split(" = ")[1].replace("\"", "")
current_version_line = [line for line in bump_version.split('\n') if 'current_version' in line][0]
version = current_version_line.split('=')[1].strip().strip('"')

setuptools.setup(
name="streamlit-pdf-viewer",
Expand Down

0 comments on commit b522dbd

Please sign in to comment.