Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable make template to be run without upgrading to the latest version of the template #73

Open
seanh opened this issue Oct 3, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@seanh
Copy link
Contributor

seanh commented Oct 3, 2022

There are two reasons to run make template:

  1. There have been changes to the cookiecutter and you want to apply them to the current project
  2. You've changed something in the current project's cookiecutter.json file (for example: the Python versions) and you want to apply that change

Currently if a project isn't up to date with the latest cookiecutter and you've changed something in cookiecutter.json and want to apply it you can't do that without also applying the changes from the cookiecutter: make template will both apply the changes you've made in cookiecutter.json (e.g. changing the Python versions) and apply the changes from the cookiecutter at once.

It would be nice if the project's current version of the cookiecutter (commit SHA) were saved in cookiecutter.json and make template used that version of the cookiecutter instead of the latest. Then you could make changes to cookiecutter.json and run make template to apply them without also upgrading the project to the latest version of the cookiecutter. make template args=upgrade could be used to upgrade to the latest cookiecutter.

make template already has some of what we'd need to implement this. You can optionally put a "checkout" setting in cookiecutter.json and make template will pass it to cookiecutter's checkout option. Currently "checkout" in cookiecutter.json is null by default. We'd need to make it put in the SHA of the cookiecutter commit that was used instead.

@seanh seanh added the enhancement New feature or request label Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant