visual-studio Teamcity 工件路径如何工作?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/182044/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 09:43:15  来源:igfitidea点击:

How do Teamcity artifact paths work?

visual-studioteamcityartifact

提问by Xerx

Can anyone give me an example of what the Artifact paths setting defined for a build configuration could look like if I want to create two artifacts dist and source where I am using the sln 2008 build runner and building my projects using the default bin/Release?

如果我想在使用 sln 2008 构建运行程序并使用默认 bin/Release 构建我的项目的地方创建两个工件 dist 和 source,谁能给我一个为构建配置定义的工件路径设置的示例?

**/Source/Code/MyProject/bin/Release/*.* => dist
**/*.* => source

I get two artifact roots dist and source but under dist I get the whole directory structure (Source/Code/MyProject/bin/Release) which I don't want and under source I get the whole thing along with obj and bin/Release which I do not want.

我得到了两个工件根目录 dist 和 source 但在 dist 下我得到了我不想要的整个目录结构(Source/Code/MyProject/bin/Release),在 source 下我得到了整个东西以及 obj 和 bin/Release我不想。

Can you give some advice on how to do this correctly?

您能否就如何正确执行此操作提供一些建议?

Do I need to change the target location for all the projects I am building to be able to get this thing to work?

我是否需要更改我正在构建的所有项目的目标位置才能使这件事起作用?

回答by Scott Cowan

So you'll just need:

所以你只需要:

Source\Code\MyProject\bin\Release\* => dist
Source\**\* => source

This will put all the files in release into a artifact folder called dist and everything in Source into a artifact folder called source.

这会将 release 中的所有文件放入名为 dist 的工件文件夹中,并将 Source 中的所有内容放入名为 source 的工件文件夹中。

If you have subfolders in Release try:

如果您在 Release 中有子文件夹,请尝试:

Source\Code\MyProject\bin\Release\**\* => dist

回答by user233173

According to TeamCity documentation; it should be like this:

根据 TeamCity 文档;它应该是这样的:

file_name|directory_name|Ant-like wildcard [ => target_directory ]

So..

所以..

Source\Code\MyProject\bin\Release|**\* => dist  (| not \)