问题
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