Minimatch exclude pattern in VSTS publish task

不羁岁月 提交于 2020-01-07 02:01:48

问题


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

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.


回答1:


To get this to work,

  • 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.

The minimatch filter is as follows...

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


来源:https://stackoverflow.com/questions/37346216/minimatch-exclude-pattern-in-vsts-publish-task

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!