Skip to content

Commit

Permalink
get version from the base package naem
Browse files Browse the repository at this point in the history
  • Loading branch information
desultory committed Jul 21, 2024
1 parent 5d1ec08 commit 46db719
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ugrd/base/cmdline.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = 'desultory'
__version__ = '2.3.0'
__version__ = '2.3.1'


CMDLINE_BOOLS = ['quiet', 'debug', 'recovery', 'rootwait']
Expand Down Expand Up @@ -62,7 +62,7 @@ def export_exports(self) -> list:
""" Returns a bash script exporting all exports defined in the exports key. """
from importlib.metadata import version, PackageNotFoundError
try:
self['exports']['VERSION'] = version(__package__)
self['exports']['VERSION'] = version(__package__.split('.')[0])
except PackageNotFoundError:
self['exports']['VERSION'] = 9999
return [f'setvar {key} "{value}"' for key, value in self['exports'].items()]

0 comments on commit 46db719

Please sign in to comment.