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

Support rendering preview of template changes in a feature branch for component update / package update #618

Closed
simu opened this issue Aug 31, 2022 · 1 comment · Fixed by #1072
Labels
enhancement New feature or request

Comments

@simu
Copy link
Member

simu commented Aug 31, 2022

Context

We currently have no clean way to preview template changes on a feature branch of the template repository with Cruft. We can preview the changes by manually editing .cruft.json to point to the feature branch (assuming that the last rendered template commit is an ancestor of the feature branch). However, we don't have any way to preview the template changes in the sync GitHub action which runs for PRs on the template repository.

To support these previews out of the box with component update, we probably need to add additional logic to cruft._commands.update, as that command currently doesn't support using a different template version to render the "old" and "new" template states.

Additionally we'll have to add a command line flag which allows users to specify the feature branch that should be used.

@simu simu added the enhancement New feature or request label Aug 31, 2022
@simu simu changed the title Add support to preview template changes in a feature branch for component update / package update Support rendering preview of template changes in a feature branch for component update / package update Aug 31, 2022
@simu
Copy link
Member Author

simu commented Dec 30, 2024

Update: recent Cruft versions take into account the provided template Git version when applying updates (cf. parameter checkout and https://github.com/cruft/cruft/blob/33f6b722fc6fe4b5d26a351e487372e5e4375ab2/cruft/_commands/update.py#L82), so we can simply introduce a parameter --template-version for the component/package update and sync commands.

simu added a commit that referenced this issue Dec 30, 2024
We make use of the native support for specifying a template version in
Cruft to pass through a custom version in dependency update and sync.

We introduce flag `--template-version` for the component and package
`update` and `sync` commands.

Resolves #618
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

Successfully merging a pull request may close this issue.

1 participant