Re-implement wait for publish
Merge pull request #426 from k88hudson/wait-for-publish

Re-implement wait for publish