Skip to content

Commit

Permalink
set skip-worktree on version file
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksanders committed Sep 12, 2024
1 parent 9f3238e commit 9ba485c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
requires = ["hatchling", "hatch-vcs", "hatch-build-scripts"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 9ba485c

Please sign in to comment.