Added support for to automate rest-machine script during build phase.