Skip to content

Commit beff5d8

Browse files
authored
optional artifacts (#14)
1 parent 79c2c8a commit beff5d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ an array of scripts to the `tool.hatch.build.hooks.build-scripts.scripts` key in
2727
| Key | Default | Description |
2828
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------- |
2929
| `commands` | required | An array of commands to run. Each command is run in a separate shell. |
30-
| `artifacts` | required | An array of artifact patterns (same as `.gitignore`) to include in your package distributions. |
30+
| `artifacts` | `[]` | An array of artifact patterns (same as `.gitignore`) to include in your package distributions. |
3131
| `out_dir` | `"."` | The directory to copy artifacts into. |
3232
| `work_dir` | `"."` | The directory to run the commands in. All artifact patterns are relative to this directory. |
3333
| `clean_artifacts` | `true` | Whether to clean files from the `out_dir` that match the artifact patterns before running the commands. |

src/hatch_build_scripts/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class OneScriptConfig:
109109
commands: Sequence[str]
110110
"""The commands to run"""
111111

112-
artifacts: Sequence[str]
112+
artifacts: Sequence[str] = ()
113113
"""Git file patterns relative to the work_dir to save as build artifacts"""
114114

115115
out_dir: str = "."

0 commit comments

Comments
 (0)