在我们的 TFS2018 网站上,我为我们的开发分支和发布分支定义了构建定义。发布分支具有以下命名约定:Release_yyyy_mm_dd。
DEV Branch
|
-- Release Folder
| |
| -- Release_2018_01_01 Branch
| -- Release_2018_01_15 Branch
| -- Release_2018_01_29 Branch *current*
我们有很多需要构建的代码(MAP文件夹)和很多不需要构建的代码(CLOAK文件夹)。
例如:
MAP Release_2018_02_22\ServiceA
MAP Release_2018_02_22\ServiceB
CLOAK Release_2018_02_22\ServiceC
CLOAK Release_2018_02_22\GigsOfDataThatDoesntNeedGetting
*repeat this for 50 folders*
我们每次 sprint 都会发布,所以我每次都必须调整发布分支文件夹。这就是我引入构建变量 $(CurrentReleaseBranch) 的原因。
例如:
$(CurrentReleaseBranch) on the variables TAB set to "Release_2018_02_22".
MAP $(CurrentReleaseBranch)\ServiceA
MAP $(CurrentReleaseBranch)\ServiceB
CLOAK $(CurrentReleaseBranch)\ServiceC
CLOAK $(CurrentReleaseBranch)\GigsOfDataThatDoesntNeedGetting
*repeat this for 50 folders*
我在此构建定义上有一个门控签入触发器,并选中了使用工作区映射进行过滤器选项。在此分支上签入代码时,不会显示门控签入。
当我在映射中使用硬编码路径时,门控签入对话框确实出现在 Visual Studio 中。
我怎样才能使用变量并且仍然有门控签到?