VSTS 释放多行变量 [英] VSTS Release multi-line variable
问题描述
我在 VSTS 发布管理中有删除文件的任务.我想让内容来自一个变量.我创建了一个变量,但我不知道如何创建一个多行变量.例如,一个删除三种类型文件的变量:
I have task in VSTS release management that deletes files. I want to have the Contents come from a variable. I have created a variable but I can't figure out how to create a multi-line variable. So for example a variable that deletes the three types of files:
变量名= ExcludeFiles
变量值 = "Lib" "bin*.pdb" "bin*.dll.config"
Variable Name= ExcludeFiles
Variable Value= "Lib" "bin*.pdb" "bin*.dll.config"
推荐答案
不支持多行变量,我在这里提交用户意见:构建和发布中的多行变量.
Multi-line variable is not supported, I submit a user voice here: Multiple lines variable in Build and Release.
基于删除文件任务的源代码,它通过' '分割内容值,但根据我的测试,将' '添加到变量不起作用(例如t1.txt t2.txt或 t1.txt t2.txt).
Based on the source code of Delete Files task, it splits contents value by ‘ ’, but based on my test, add ‘ ’ to variable isn’t working (e.g. t1.txt t2.txt or t1.txt t2.txt).
您可以根据删除文件任务的源代码自定义构建/发布任务,或者使用您的逻辑来完成它并通过 PowerShell/命令行任务执行它.
You can custom build/release task per to the source code of Delete Files task or to do it with your logical and execute it through PowerShell/Command Line task.
这篇关于VSTS 释放多行变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!