Publishing command now supports custom commit messages.

Fixed and polished @pimpin's work.