.net WebDeploy is there any way to run command/script on the target machine after deploy

不想你离开。 提交于 2019-12-12 03:43:55

问题


I have and .net/angular2 application, I'm publishing with WebDeploy. But when the publish finish I wanna run some command on the target machine like

npm install
npm run tsc

There is a way to do that?


回答1:


You should be able to use the postSync argument:

msdeploy -verb:sync -source:contentPath="C:\Test1" -dest:contentPath="C:\Test2" -postSync:runcommand="c:\MyBatchFile.bat" 

https://technet.microsoft.com/en-us/library/dd569089(v=ws.10).aspx



来源:https://stackoverflow.com/questions/39454497/net-webdeploy-is-there-any-way-to-run-command-script-on-the-target-machine-afte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!