如何在门控签入时忽略 JS 和 CSS 文件?

发布于 2024-11-19 14:44:09 字数 97 浏览 2 评论 0原文

当我们仅签入 jscss 文件时,有没有办法避免自动构建?

它不需要构建任何东西,我想跳过这些文件的构建。

Is there a way to avoid the automated build when we checkin only js or css files?

It doesn't need to build anything, I would like to skip the build for these files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

溺ぐ爱和你が 2024-11-26 14:44:09

我认为不可能做你想做的事——我认为门控签到还没有那么成熟。对于门控签到有很多未解决的增强请求。可能值得将其添加为请求。即使隐藏的文件夹也是文件夹级别的,而不是文件级别的。

来自 MSDN:

自动运行门控签到
构建

门控签入构建已运行
自动当任一
发生以下事件:

  • 已定义构建并选中了门控签入复选框
    构建的触发器选项卡
    定义。

  • 有人尝试签入与以下内容相交的一个或多个更改
    中的任何映射文件夹
    构建定义的“工作区”选项卡。

即使您添加 ***NO_CI*** 标签并尝试签入,它仍然会触发检查以构建更改。

明显的解决方法当然是选中复选框,忽略进行构建的需要(我确信您正在试图避免这种路径)。

如果我们看一下编辑构建定义的 UI,就会发现没有规则等可选参数。重要的是映射的文件夹。

但是,您可以通过隐藏工作区文件夹来将特定文件夹设置为不构建。但是,如果您这样做,它根本不会拾取这些文件进行构建。因此,如果您将所有 JS 文件放在一个文件夹中,并使用隐藏方法将其从构建中排除,那么当您真正想要运行构建时,构建将会失败。

I don't think it is possible to do what you are wanting to do- I don't think gated check-ins is that mature yet. There are quite a few outstanding enhancement requests for gated check-ins. It might be worth adding this as a request. Even cloaked folders are at the folder level and not the file level.

From MSDN:

Automatically Run Gated Check-in
Builds

A gated check-in build is run
automatically when either of the
following events occur:

  • A build has been defined with the Gated Check-in check box selected on
    the Trigger tab of the build
    definition.

  • Someone attempts to check in one or more changes that intersect with
    any of the mapped folders in the
    Workspace tab of the build definition.

Even if you add a ***NO_CI*** tag and try to checkin, it will stll fire the check to build changes.

The obvious workaround is of course to check the checkbox ignoring the need to do a build (a path I am sure you are trying to avoid).

If we take a look at the UI around editing a build definition, there aren't optional parameters for rules etcetera. All that matters is the mapped folders.

You can however set specific folders to not build by cloaking a workspace folder. However, if you do that, it will not pick up those files for builds at all. So if you had all your JS files in one folder and excluded it from the build using the cloaked approach builds would fail when you actually wanted to run the build.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文