部署后,.net WebDeploy可以在目标计算机上运行任何命令/脚本 [英] .net WebDeploy is there any way to run command/script on the target machine after deploy

查看:87
本文介绍了部署后,.net WebDeploy可以在目标计算机上运行任何命令/脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有.net/angular2应用程序,我正在使用WebDeploy发布. 但是当发布完成后,我想在目标计算机上运行一些命令,例如

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

有办法做到吗?

推荐答案

您应该可以使用postSync参数:

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

这篇关于部署后,.net WebDeploy可以在目标计算机上运行任何命令/脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆