You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With copier copy commands, it can read _skip_if_exists in copier config yml to skip some files by template owner's intentions.
But with copier update commands, it only see a answered file and doesn't know the files to be needed to skip. It needs to use -s to skip files manually.
git clone https://github.com/serious-scaffold/ss-pybind11
git checkout a0a8bb49a4653f0da086f6ebbe7b41f7e223b83b
cd template
copier update -a .copier-answers.ss-cmake.yml
Logs
vscode ➜ /workspaces/ss-pybind11/template (a0a8bb4) $ copier update -a .copier-answers.ss-cmake.ymlUpdating to template version 0.0.7vscode ➜ /workspaces/ss-pybind11/template (a0a8bb4) $ git statusHEAD detached at a0a8bb4Unmerged paths: (use "git restore --staged <file>..." to unstage) (use "git add <file>..." to mark resolution) both modified: CMakeLists.txt.jinja both modified: vcpkg.json.jinjaChanges not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: .copier-answers.ss-cmake.ymlno changes added to commit (use "git add" and/or "git commit -a")vscode ➜ /workspaces/ss-pybind11/template (a0a8bb4) $ cat CMakeLists.txt.jinja | grep updating<<<<<<< before updating>>>>>>> after updating
It update successfully with conflicts results.
Expected behavior
It can update template according to _skip_if_exists files in copier config yml or specify files to skip in a answered file.(Prefer to the second solution)
Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
Linux f3e2c9372be8 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Copier version
copier 9.4.1
Python version
Python 3.10.12
Installation method
pipx+pypi
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is it possible to specify files to skip in the answered file? I consider it is more general use.
msclock
changed the title
copier update -a dosen't respect _skip_if_exists in copier config ymlcopier update -a in the subdirectory dosen't respect _skip_if_exists in copier config yml
Dec 23, 2024
Describe the problem
With
copier copy
commands, it can read_skip_if_exists
in copier config yml to skip some files by template owner's intentions.But with
copier update
commands, it only see a answered file and doesn't know the files to be needed to skip. It needs to use-s
to skip files manually.Template
Use renovate copier manager can update template https://github.com/serious-scaffold/ss-cmake in the my repo sub folder https://github.com/serious-scaffold/ss-pybind11/tree/master/template automatically. And it seems not possible to specify files to skip in the renovaterc.json. Also, it is not reasonable to specify files for general use. See serious-scaffold/ss-pybind11#73, it still reported conflicts requiring manual resolution and didn't update without conflicts according to
_skip_if_exists
in copier config file https://github.com/serious-scaffold/ss-cmake/blob/ab17e79610f249422663c0f3c70d5d4a70a0ea15/copier.yml#L18-L23To Reproduce
Reproduce results in pr:
git clone https://github.com/serious-scaffold/ss-pybind11 git checkout a0a8bb49a4653f0da086f6ebbe7b41f7e223b83b cd template copier update -a .copier-answers.ss-cmake.yml
Logs
It update successfully with conflicts results.
Expected behavior
It can update template according to
_skip_if_exists
files in copier config yml or specify files to skip in a answered file.(Prefer to the second solution)Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
Linux f3e2c9372be8 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Copier version
copier 9.4.1
Python version
Python 3.10.12
Installation method
pipx+pypi
Additional context
No response
The text was updated successfully, but these errors were encountered: