VSTS发布任务中的Minimatch排除模式 [英] Minimatch exclude pattern in VSTS publish task

查看:83
本文介绍了VSTS发布任务中的Minimatch排除模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力使这种minimatch排除模式起作用.

I've been wrestling with getting this minimatch exclude pattern to work.

** \ src!(软件包)模式可以按预期工作,但是我还需要排除src目录下的web.template.config文件.我已经尝试了几种方法,包括 ** \ src!(packages | Web.template .config)

The **\src!(packages) pattern works as expected but I need to also exclude web.template.config files under the src directory. I've tried several things including **\src!(packages|Web.template.config)

任何人都可以帮助或指出解决此问题的好方法吗?我被卡住了.

Can anyone help or point me to a good way of troubleshooting this? I'm stuck.

推荐答案

要使其正常工作,

To get this to work,

  • 我添加了复制文件任务
  • 将迷你匹配过滤器应用于复制文件任务
  • 使用发布任务复制整个$(build.artifactstagingdirectory)目录.
  • I added the Copy Files task
  • Applied the minimatch filter to the Copy Files task
  • Used the Publish Task to copy the entire $(build.artifactstagingdirectory) directory.

minimatch过滤器如下...

The minimatch filter is as follows...

**/src/**/!(*eb.*emplate*.config)
!**/packages{,/**}

这篇关于VSTS发布任务中的Minimatch排除模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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