Skip to content

Commit

Permalink
final fix version getter
Browse files Browse the repository at this point in the history
  • Loading branch information
merlos committed Nov 5, 2024
1 parent 955e6f1 commit 0f1ad02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion primero-api/primero_api/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__='0.2.4'
__version__ = "0.2.4"

def get_version():
return __version__
2 changes: 1 addition & 1 deletion primero-api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_version():
version_file = os.path.join(os.path.dirname(__file__), 'primero_api','version.py')
with open(version_file) as f:
version_line = f.read().strip()
version_match = re.match(r"^__version__ = '\"['\"]", version_line)
version_match = re.match(r"^__version__ = ['\"]([^'\"]*)['\"]", version_line)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
Expand Down

0 comments on commit 0f1ad02

Please sign in to comment.