Skip to content

Commit 0684d81

Browse files
committed
👌 copier.yml: Exclude scaffold files from copier update
README.md, docs/index.md, and the package __init__.py are minimal scaffolds that users customize early. Overwriting them on `copier update` would discard those changes. Add all three to `_exclude`, matching the existing pattern for tests/ and CHANGELOG.md.
1 parent b51d60f commit 0684d81

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

copier.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ _message_after_copy: |
3737
_exclude:
3838
- "{% if _copier_operation == 'update' -%}tests{% endif %}"
3939
- "{% if _copier_operation == 'update' -%}CHANGELOG.md{% endif %}"
40+
- "{% if _copier_operation == 'update' -%}README.md{% endif %}"
41+
- "{% if _copier_operation == 'update' -%}docs/index.md{% endif %}"
42+
- "{% if _copier_operation == 'update' -%}src/{{ package_name.lower().replace('-', '_') }}/__init__.py{% endif %}"

0 commit comments

Comments
 (0)