gpt4 book ai didi

msdeploy - 跳过 msdeploy 中的规则

转载 作者:行者123 更新时间:2023-12-02 20:17:29 25 4
gpt4 key购买 nike

我向 msdeploy 传递了几个跳过参数,以便不同步(删除和更新)某些目录和文件

 -skip:skipAction='Update',objectName='filePath',absolutePath='.*\\documents\\.*'

它似乎不起作用,一些目录和文件被删除。我很确定给absolutePath的正则表达式没有问题

谁能解释一下跳过规则的匹配原理吗?按照正则表达式和objectName显然是不行的。

最佳答案

看这里:

http://forums.iis.net/p/1192163/2031814.aspx#2031813

The way skip rules are applied is based on the order of the synchronization operation(delete, update, add) is done on the actual object(directory or file).

For example, if there's a delete operation on the directory, the skip rules for files within the directory for the delete operation will NOT PREVENT files from being get DELETED!

In my case, the directory MySite\MobileForms get deleted entirely. The skip rule I set for the files is useless.

And for the directory, my mistake is in the regular expression:

-skip:skipAction='Delete',objectName='dirPath',absolutePath='.*\\MobileForms\\.*'

Should be:

-skip:skipAction='Delete',objectName='dirPath',absolutePath='.*\\MobileForms$'

which says that it should skip deleting directory path MobileForms(the first rule erroneously included slash in the regular expression).

希望这对其他人也有帮助。

关于msdeploy - 跳过 msdeploy 中的规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12675715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com