more dynamic versioning stuff
Some checks failed
Python package / lint (push) Successful in 7s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in 9s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been skipped
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release (push) Has been skipped
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to TestPyPI (push) Failing after 2s

This commit is contained in:
Brendan Haines 2024-09-14 17:12:54 -06:00
parent f750ec9040
commit b6f593fa4a
3 changed files with 5 additions and 2 deletions

1
goat_monitor/_version.py Normal file
View File

@ -0,0 +1 @@
__version__ = "editable"

View File

@ -9,7 +9,7 @@ import gotify
import numpy as np import numpy as np
import toml import toml
from goat_monitor import __version__ from goat_monitor._version import __version__
# %% commands # %% commands
@ -37,7 +37,7 @@ def wrap(command: List[str], config: Path, retries: int, version):
"""Wrap an arbitrary command with gotify notifications""" """Wrap an arbitrary command with gotify notifications"""
if version: if version:
print(version) print(__version__)
sys.exit(0) sys.exit(0)
# read settings first # read settings first

View File

@ -20,6 +20,8 @@ homepage = "https://git.brendanhaines.com/brendanhaines/goat_monitor"
[project.scripts] [project.scripts]
goat_monitor = "goat_monitor.goat_monitor:main" goat_monitor = "goat_monitor.goat_monitor:main"
[tool.setuptools_scm]
version_file = "goat_monitor/_version.py"
[tool.black] [tool.black]
line-length = 120 line-length = 120