FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
86 stars 47 forks source link

mdk pull should purge caches #52

Closed andrewnicols closed 10 years ago

andrewnicols commented 10 years ago

There's rarely a time when you don't want to purge caches after pulling a fix in. I'd argue that we should purge caches as we pull in a patch, but provide a --no-purge | -P option for those times when you don't want to.

FMCorz commented 10 years ago

I do not agree that cache should be purged. I am trying not to add side effects to commands so that it does not do anything you would not expect. You could also see that a purge might hide some problems in the patch you are testing. For example, the version should be bumped with new lang strings/styles, if the purge applies automatically you might miss that point.

Perhaps we could have a hook system, similar to the one git has, to execute a command after another one. At some point Dan wanted an automated run of the script dev on his new instances, he solved his problem by using an alias, but really a hook system would be ideal for both of your requests.

Why do you think?

FMCorz commented 10 years ago

For now none of the commands accept a --purge argument, and I think it's fair enough that you can call mdk purge to do what you want. Most of the commands could use a purge at some points but I don't think we should add it to every single command.

mdk pull 12345 && mdk purge FTW :).