MSDeploy中有多个跳转? [英] Multiple skips in MSDeploy?

查看:70
本文介绍了MSDeploy中有多个跳转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 -skip参数,但是有什么方法可以告诉MSDeploy跳过多个目录?多次调用该参数似乎无效.

I'm aware of the -skip parameter, but is there any way to tell MSDeploy to skip multiple directories? Invoking the parameter multiple times does not appear to work.

推荐答案

如果文件夹C:\Data\Personal\My Repo\MSDeploy\MultiSkip中包含以下文件.

If you have the following files in the folder C:\Data\Personal\My Repo\MSDeploy\MultiSkip.

要同步源到目标的命令将是:

To sync source to dest the command would be:

msdeploy -verb:sync 
    -source:contentPath="C:\Data\Personal\My Repo\MSDeploy\MultiSkip\Source" 
    -dest:contentPath="C:\Data\Personal\My Repo\MSDeploy\MultiSkip\Dest"

更改如下图所示.

没有跳过就可以进行19个更改.

With no skips there are 19 changes.

跳过1个文件夹

然后,跳过sub03目录的命令为:

Then the command to skip the sub03 directory would be:

msdeploy -verb:sync 
    -source:contentPath="C:\Data\Personal\My Repo\MSDeploy\MultiSkip\Source" 
    -dest:contentPath="C:\Data\Personal\My Repo\MSDeploy\MultiSkip\Dest" 
    -skip:objectName=dirPath,absolutePath="sub03"

结果将是:

因此,添加了14个文件.

So there are 14 added files.

跳过2个目录

要跳过2个目录,命令将是

To skip 2 directories the command would be

msdeploy -verb:sync 
    -source:contentPath="C:\Data\Personal\My Repo\MSDeploy\MultiSkip\Source" 
    -dest:contentPath="C:\Data\Personal\My Repo\MSDeploy\MultiSkip\Dest" 
    -skip:objectName=dirPath,absolutePath="sub03" 
    -skip:objectName=dirPath,absolutePath="sub02"

然后得出的结果是 这里只有9个更改,因此我们可以看到多次跳过确实有效.

Then the result of that is There are only 9 changes here so we can see that multiple skips does work.

这篇关于MSDeploy中有多个跳转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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