rewrote port publishing options to be safer/satisfy shellcheck