VSTS发布多行变量 [英] VSTS Release multi-line variable

查看:60
本文介绍了VSTS发布多行变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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:

变量名称=排除文件
变量值=库""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.

基于删除文件"任务的源代码,它将内容值除以'\ n',但是根据我的测试,将'\ n'添加到变量中不起作用(例如t1.txt \ n t2.txt或t1.txt \ nt2.txt).

Based on the source code of Delete Files task, it splits contents value by ‘\n’, but based on my test, add ‘\n’ to variable isn’t working (e.g. t1.txt \n t2.txt or t1.txt\nt2.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屋!

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