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

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

问题描述

我们正在 TFS 内部使用新的 VSO/VSTS 样式构建,截至昨天,2015 年更新 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...

目前我有 *** 作为内容参数,显然会发布所有内容.我曾尝试按照 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天全站免登陆