TFS 签入策略 - 强制运行 shell 命令 [英] TFS Check-in Policy - Force a shell command to have been run

查看:34
本文介绍了TFS 签入策略 - 强制运行 shell 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我目前正在工作的项目中,我需要在签入 TFS 之前对一些静态文件运行 shell 命令.

On the project that I'm currently working I have a requirement to run a shell command over some static files prior to check-in into TFS.

是否可以使用 TFS 签入策略强制开发人员在签入之前运行 shell 脚本?

Is it possible to use TFS checkin policies to force a developer to run a shell script prior to check-in?

推荐答案

签入策略旨在用于此目的:检查某些内容以授权"签入.

Check-in Policies are designed for this purpose: to check for something in order to "authorize" the check-in.

您会在此处找到有关如何开发的有趣视频一.您会发现这真的很简单,一旦您完成了第一个工作,您就会想要自定义更多 TFS.

You'll find an interesting video here about how to develop one. You'll see that it's really easy and once you did your first you will want to customize more TFS.

在这种情况下,您将有两个选择(恕我直言):

In you case you will have two options (IMHO):

  1. 在签入策略的 Evaluate 方法中运行 shell 命令.
  2. 检查用户是否在 Evaluate 方法中手动运行了 shell 命令.

第一个应该是最好的,但它让我有点困扰,因为提前执行任务并不是签入策略的真正目的,但我想不出为什么它不应该起作用.也许你不得不那样做,第二个解决方案是不可能的.

The first should be the best but it bothers me a bit because it's not the true purpose of the check-in policies to perform a task upfront, but I can't think about why it shouldn't work. And maybe you'll have to go that way it the second solution is not possible.

这篇关于TFS 签入策略 - 强制运行 shell 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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