从VSTS发布中排除文件/文件夹 [英] Excluding files/folders from VSTS publish

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

问题描述

我们正在TFS的前提下使用新的VSO/VSTS样式构建,前提是截至2015年9月1日.

We are using the new VSO/VSTS style build within TFS on premise, 2015 Update 1 as of yesterday.

在发布构建工件阶段,我们要从根栏2个子文件夹中复制所有文件/文件夹.

During the publish build artifacts stage we want to copy all the files/folders from a root bar 2 sub folders.

即:

$\somefilestopublish1\...
$\somefilestopublish2\...
$\somefilestoexclude1\...
$\somefilestoexclude2\...

当前,我将**\*作为content参数,显然它将发布所有内容.我曾尝试按照Google搜索的建议附加;-:<exclude_pattern>,但是这只是停止了所有输出并导致了一个空文件夹.

Currently I have **\* as the contents argument which obviously will publish everything. I have tried appending ;-:<exclude_pattern> as suggested by a Google search but that just stopped all output and resulted in an empty folder.

是否可以使用minimatch表达式排除文件夹,还是需要交换以明确选择要发布的文件夹.

Is there a way to use the minimatch expression to exclude folders or will I need to swap to explicitly selecting the folders to publish instead.

推荐答案

Minimatch使用!"排除给定的模式.您可以使用以下格式指定它:

Minimatch use "!" to exclude the given pattern. You could specify it with following format:

!(somefilestoexclude1|somefilestoexclude2)

以下是示例: 使用!(bin | obj)时,"WindowsFormsApplication1"文件夹下的"bin"文件夹和"obj"文件夹不会复制到工件.

Following is the example: With !(bin|obj), "bin" folder and "obj" folder under "WindowsFormsApplication1" folder are not copied to artifact.

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

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