Execute pre and post hooks when upgrading releases if defined.