Revert to 4f4af3d1100653d4f3eabf065d5d0756736ee1e6
Made the publish script a bit safer.