Skip to content

Commit e73cad3

Browse files
committed
fix: 🐛 fix copier update
1 parent bdb5101 commit e73cad3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

template/.github/workflows/update-from-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
- name: Pull request with updates from template
4343
run: |
44-
copier update --trust --defaults --overwrite
44+
just update-from-template
4545
any_changes=$(git status --porcelain=v1 2>/dev/null | wc -l)
4646
if [ "$any_changes" -eq 0 ]; then
4747
echo "No updates from the template detected, and no changes found. Stopping and exiting."

template/justfile.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ build-contributors:
116116

117117
# Check for and apply updates from the template
118118
update-from-template:
119-
uvx copier update --trust --defaults
119+
# Do not update existing source files
120+
uvx copier update --trust --defaults $(find src/{{ github_repo_snake_case }} -type f -printf "--exclude %p ")
120121

121122
# Reset repo changes to match the template
122123
reset-from-template:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
{{ dict(_copier_answers, copyright_year=copyright_year) | to_nice_yaml -}}
2+
{{ dict(_copier_answers, github_repo=github_repo, copyright_year=copyright_year) | to_nice_yaml -}}

0 commit comments

Comments
 (0)