welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Can't exclude specific plugin #428

Closed dompl closed 6 years ago

dompl commented 6 years ago

Hi.

I am having a bit of a nightmare trying to exclude specific plugin from my wp-content/plugins

In my Movefile I have:

  exclude:
    - "/wp-content/plugins/my-plugin/"

although no matter what the plugin is still being transferred both ways.

Unfortunately, I can't just do

  exclude:
    - "/my-plugin/"

as there are other folders name the same.

Is there something wrong with the exclude path? I think I have tried all the variations and nothing seem to be working.

alessandro-fazzi commented 6 years ago

Hi,

was wp-content/plugins/my-plugin/ already one of the tried variations?

alessandro-fazzi commented 6 years ago

Oh but the most important question is: which command are you using?

dompl commented 6 years ago

Hi @pioneerskies

Thank you for getting back.

Yes, wp-content/plugins/my-plugin was one of the variations.

Reg the push/pull it really depends, so sometimes it's -p sometimes it's --all. But in this case testing purposes, I only used -p flag.

My guess is that it makes a difference, right?

alessandro-fazzi commented 6 years ago

@dompl , I've done a big dive into the rsync manual and into the wordmove's behaviour.

I'd take this as a bug. What happens is that wordmove changes the rsyc's root path when sync-ing a subfolder, while sync-ing --all preserves the rsync's root path to the wordpress root path.

This way exclusions evaluations have different meaning for rsync depending on the wormdove command we're using.

Thanks for spotting that out. Unfortunately I have not a quick fix for this one, since I'd have to modify a core behaviour.

alessandro-fazzi commented 6 years ago

@dompl as a side effect of the new hook system released in v2.4.0, if you have wp-cli installed on your hosting, you should try an after push remote hook with cd document_root && wp plugin deactivate pluginname as a workaround.

Obviously the bug remains open and valid.

dompl commented 6 years ago

Hiya,

Thank you very much for looking into this. Unfortunately not everyone in the office will remember to deactivate it therefore I shall wait for update on this.

Thanks

alessandro-fazzi commented 6 years ago

@dompl ,

as far as you'll share the same movefile.yml, if you set there a hook, no one will need to remember nothing. Is there a misunderstanding?

Hooks are a new feature documented here if you mind about it :)

alessandro-fazzi commented 6 years ago

@dompl this was closed by a commit, but feel free to give us feedback if you mind. Correcting this bug landed in a small but really critical refactor on rsync behaviour, so let's keep eyes open ;)