首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WebDeploy 3.0 RunCommand通过WebDeploy代理执行得太快

WebDeploy 3.0 RunCommand通过WebDeploy代理执行得太快
EN

Stack Overflow用户
提问于 2014-01-09 20:51:40
回答 1查看 301关注 0票数 2

我使用的是带有清单文件的WebDeploy 3.0,该文件同时包含contentPathrunCommand

代码语言:javascript
复制
<siteManifest>
  <contentPath path="C:\Test\Path" />
  <runCommand path="echo hello" />
</siteManifest>

我遇到了一个问题,runCommand是在contentPath提供程序同步文件(仅限目录)之前执行的,而且只有在通过代理从远程机器执行时才会执行。

以下是直接通过WebDeploy执行时的输出:

代码语言:javascript
复制
Info: Using ID 'xxx' for connections to the remote server.    
Info: Adding siteManifest (siteManifest).
Info: Adding virtual path (C:\Test\Path)
Info: Adding file (C:\Test\Path\File)
Info: Updating runCommand (echo hello).
Info: hello
Info: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'.

以下是通过WebDeploy代理执行时的输出:

代码语言:javascript
复制
Info: Using ID 'xxx' for connections to the remote server.    
Info: Adding siteManifest (siteManifest).
Info: Adding virtual path (C:\Test\Path)
Info: Updating runCommand (echo hello).
Info: hello
Info: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'.
Info: Using ID 'xxx' for connections to the remote server.
Info: Adding file (C:\Test\Path\File)

你知道如何在使用WebDeploy代理时在contentPath之前停止RunCommand吗?

EN

回答 1

Stack Overflow用户

发布于 2014-01-13 05:27:38

这听起来像是与远程执行所经历的提交阶段有关。虽然我不能提供直接的解决方案,但您是否考虑过将runCommand迁移到postSync

代码语言:javascript
复制
msdeploy -verb:sync ^
         -source:manifest=manifest.xml ^
         -dest:auto,computerName=... ^
         -postSync:runCommand="echo hello"
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21020818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档