mirror of
https://github.com/basnijholt/compose-farm.git
synced 2026-02-03 14:13:26 +00:00
Add hatch-vcs for automatic version management
Version is now derived from git tags instead of hardcoded.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
src/compose_farm/_version.py
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "compose-farm"
|
||||
version = "0.1.0"
|
||||
dynamic = ["version"]
|
||||
description = "Compose Farm - run docker compose commands across multiple hosts"
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
@@ -18,9 +18,15 @@ dependencies = [
|
||||
compose-farm = "compose_farm.cli:app"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
|
||||
[tool.hatch.build.hooks.vcs]
|
||||
version-file = "src/compose_farm/_version.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/compose_farm"]
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
"""Compose Farm - run docker compose commands across multiple hosts."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
try:
|
||||
from compose_farm._version import __version__, __version_tuple__
|
||||
except ImportError:
|
||||
__version__ = "0.0.0"
|
||||
__version_tuple__ = (0, 0, 0)
|
||||
|
||||
__all__ = ["__version__", "__version_tuple__"]
|
||||
|
||||
Reference in New Issue
Block a user