diff --git a/pyproject.toml b/pyproject.toml index 9f85d9b..0154b91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["hatchling", "hatch-vcs"] +requires = ["hatchling", "hatch-vcs", "hatch-build-scripts"] build-backend = "hatchling.build" [project] @@ -34,6 +34,12 @@ repository = "https://github.com/Netflix-Skunkworks/aardvark" [tool.hatch.build] include = ["aardvark", "README.md", "LICENSE", "aardvark/config_default.yaml"] +[[tool.hatch.build.hooks.build-scripts.scripts]] +commands = [ + # the version file is updated as part of the build. this command tells git to ignore it. + "git update-index --skip-worktree aardvark/__version__.py", +] + [tool.hatch.build.hooks.vcs] version-file = "aardvark/__version__.py"