diff --git a/.gitignore b/.gitignore index 8aca44a2..3c967aed 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ collections/ *.egg-info CHANGELOG.rst target +atmosphere/_version.py ## Editors .idea diff --git a/build/build-manila-image.sh b/build/build-manila-image.sh index 2ad7ece9..cf67566b 100755 --- a/build/build-manila-image.sh +++ b/build/build-manila-image.sh @@ -3,7 +3,7 @@ set -xe -ATMOSPHERE_VERSION=$(pbr info -s atmosphere) +ATMOSPHERE_VERSION=$(python3 -c "from atmosphere._version import __version__; print(__version__)") # Create work directory TMPDIR=$(mktemp -d) diff --git a/pyproject.toml b/pyproject.toml index 281b894b..163dc7a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,3 +48,6 @@ issues = "https://github.com/vexxhost/atmosphere/issues" [tool.hatch.version] source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "atmosphere/_version.py"