Comments (4)
I don't think your suggested solution would work because Copier's update algorithm relies on a stable Git ref for replaying a fresh project creation using the old template version. If _commit: HEAD
were to be logged, then the Git ref would be ambiguous and the update algorithm wouldn't be able to determine the old template version.
I'm not sure I understand your use case of collocating a template and a project generated by that template in the same Git repo. Is this project the only project that uses the template? If so, why do you need a template at all?
from copier.
I guess you do that because it's easy for testing, right? I do the same, but I use https://github.com/KyleKing/copier-template-tester, which was made for that and already works around the problem you're talking about.
I'll close this issue because I think this will work for you, but feel free to reopen otherwise.
from copier.
BTW, HEAD
is not a valid branch name, so it will not be a problem as mention here: #184 (comment)
from copier.
I don't think your suggested solution would work because Copier's update algorithm relies on a stable Git ref for replaying a fresh project creation using the old template version. If
_commit: HEAD
were to be logged, then the Git ref would be ambiguous and the update algorithm wouldn't be able to determine the old template version.
Thanks for the explanation, I did not think of that problem before.
I'm not sure I understand your use case of collocating a template and a project generated by that template in the same Git repo. Is this project the only project that uses the template? If so, why do you need a template at all?
Actually, I want to use the generated project with default values as a straightforward demo for the template. Maybe that is not a good choice, I may consider split them in the future.
I guess you do that because it's easy for testing, right? I do the same, but I use https://github.com/KyleKing/copier-template-tester, which was made for that and already works around the problem you're talking about.
I'll close this issue because I think this will work for you, but feel free to reopen otherwise.
Thanks for the information, I will look into that. Yes, it is OK to close this issue, since the request is not valid as explained by @sisp.
from copier.
Related Issues (20)
- Exclude files or directories based on answers HOT 3
- Allow configuring Jinja with StrictUndefined HOT 3
- remove flake8 HOT 2
- Documentation is unclear to available validator methods HOT 2
- Organization avatar cut off HOT 3
- Answers Groups HOT 1
- Be able to go back to a previous answer in the template generation questions menu HOT 2
- support zip template from local or http endpoint HOT 5
- ⚠ CRITICAL: Copier 9.1.1 broken by too loose `pyyaml-include` requirement ⚠ HOT 22
- Add support for source git-repos where the template is located in a subdirectory HOT 5
- Improved logic for `when` for handling initial questions HOT 14
- Supply official shields.io badges
- default option for choices with multiselect HOT 5
- Name collision which renders repo formally broken and causes several side effects HOT 4
- Don't consider tasks for template unsafety if they're being skipped
- AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? HOT 8
- Can't update project when copying from local template HOT 1
- Updating the project creates a new .copier-answer.yml file HOT 3
- Conditional exclude items HOT 9
- Provide a way to integrate with nix templates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from copier.