Use dynamic version
This commit is contained in:
parent
d4dcbac8d9
commit
caedb1fe52
1 changed files with 10 additions and 0 deletions
10
src/test_woodpecker_ci/__init__.py
Normal file
10
src/test_woodpecker_ci/__init__.py
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import importlib.metadata
|
||||||
|
|
||||||
|
try:
|
||||||
|
from dunamai import Version, Style
|
||||||
|
|
||||||
|
__version__ = Version.from_git().serialize(style=Style.SemVer, dirty=True)
|
||||||
|
except ImportError:
|
||||||
|
# __name__ can be used if the package name is the same
|
||||||
|
# as the directory. Otherwise, specify it explicitely.
|
||||||
|
__version__ = importlib.metadata.version(__name__)
|
Loading…
Add table
Add a link
Reference in a new issue