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

Add a command to remove a deploy hook from the list of deployed hooks in the site State #6228

Open
MurzNN opened this issue Feb 14, 2025 · 1 comment

Comments

@MurzNN
Copy link

MurzNN commented Feb 14, 2025

Is your feature request related to a problem? Please describe.
We have the deploy:hook feature that very is cool and better than hook updates.

But for local development very often we want to "uninstall" the deployed hook to try to deploy it again with some fixes.

For the hook_update we can easily just revert the installed version number of the module to the previous one, like this:

drush ev "drupal_set_installed_schema_version('my_module', 10123)"

But we have no option to do the same for the deploy hook.

Describe the solution you'd like
Provide a new command to remove the hook from the list of installed hooks, something like:

drush deploy:hook-remove hook_name

In this command we have to read the deploy_hook.existing_updates value from the site State, and remove the required hook from the list.

Describe alternatives you've considered
Instead of a separate command to unmark the hook_deploy as deployed, maybe we can introduce a way to force redeploy the specific hook_deploy by it's name, even if it is already deployed.

Additional context
Also, would be great to have the ability to list all currently deployed hooks.

And maybe provide a direct command to revert the module schema version too, instead of doing this using drush ev?

@mfrieling
Copy link

I've created this hook for my current project. At the moment I'm too busy but as soon as I find some time I'm willing to share it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants