Skip to content
Alessandro Fazzi edited this page Dec 27, 2017 · 11 revisions

Wordmove has 8 hooks which will be called if populated with commands. This is how they are represented in the movefile.yml:

  hooks: # Remote hooks won't work with FTP
    push:
      before:
        local:
          - 'echo "Do something locally before push"'
        remote:
          - 'echo "Do something remotely before push"'
      after:
        local:
          - 'echo "Do something locally after push"'
        remote:
          - 'echo "Do something remotely after push"'
    pull:
      before:
        local:
          - 'echo "Do something locally before pull"'
        remote:
          - 'echo "Do something remotely before pull"'
      after:
        local:
          - 'echo "Do something locally after pull"'
        remote:
          - 'echo "Do something remotely after pull"'

Hooks are optional. You can remove the entire hooks key from movefile.yml or you can configure just the hooks you need, erasing the others.

Each hook want a sequence - which is the YAML representation of and array - of commands.

Commands must be quoted. Prefer single quote, since double quotes are often used inside the command self. If you won't quote commands, they will easily break our toy :)

Hooks are under the vigilance of the doctor command, so you can wordmove doctor to check their formal validation.