make release hook more flexible