feat: provide a noninteractive way to check clone state
See original GitHub issueIs your feature request related to a problem? Please describe.
There is no noninteractive way to check if template clones are up-to-date with the latest changes in the template. Likewise, there is no way to figure out if a configuration drift had occurred.
Describe the solution you’d like
I’d like Copier to provide mechanism(s) to test those 2 states.
Describe alternatives you’ve considered
Using Cruft which supports this functionality in 2 ways, with:
- a
check
command: only check if the project is up to date - a
diff
command with an--exit-code
: check if the project has drifted
Additional context
I’d like to schedule a clone state check with a CI service.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
zdharma-continuum/zinit: Flexible and fast ZSH plugin manager
The plugin manager gives reports from plugin loadings describing what aliases, functions, bindkeys, Zle widgets, zstyles, completions, variables, PATH and FPATH ...
Read more >git-checkout Documentation - Git
This is used to throw away local changes and any untracked files or directories that are in the way. When checking out paths...
Read more >lftp - Unix, Linux Command - Tutorialspoint
It means that a file or directory would be mirrored if it matches an include and does not match to excludes after the...
Read more >Caching general build artifacts between stages - GitLab.org
The state of caching and artifacts. I agree with you that there should be much easier way to have achieve simple flow: build-test-deploy...
Read more >SoundExchange: Claim Your Money!
As we've already explained, SoundExchange is the entity that currently collects master performance royalties from non-interactive digital streaming services in.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If that’s how Cruft works, then it makes me happy because I see Copier makes a big improvement.
In Copier, updating compares the original template with the latest version and extracts the diff, then applies it into your project. This is more powerful because it lets you modify any files and still get updates if your modifications don’t conflict with how the template has evolved.
Only when both the template and the generated project have evolved differently the same code, Copier will leave
*.rej
files around with them.What you want is something I call a “recopy”, which ignores such evolution and just reapplies the latest template on top of your current project, just reusing the answers. Recopies are not supported on Copier 5, but for v6 they’re already in master, so nothing to do here.
Fair enough, thanks for the clarification and for your time!