#198: command/build: fix message
#199: command/publish: finish cortex.scripts.prepublish; refractor the main flow of cortex publish