如何将构建变量永久保存为构建步骤? [英] How to permanently save a build variable as a build step?

查看:40
本文介绍了如何将构建变量永久保存为构建步骤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我定义了以下变量:

现在一旦构建完成(构建过程的最后一步),我想更新 VersionRevision 变量,基本上是增加它.

Now once a build is complete (the last step in the build process), I want to update the VersionRevision variable, basically increment it.

所以我正在寻找一个可以从 C# 调用的 API,并创建一个控制台应用程序或一个 powershell 脚本来编辑构建定义(如果我必须这样做)?

So I'm looking for an API I can call from C# and create a console application or a powershell script to edit the build definition (if I have to do this)?

推荐答案

您可以使用 VSTS Rest API 更新构建定义中的变量值.控制台应用程序和 Powershell 脚本都可以.

You can use VSTS Rest API to update the variable value in Build Definition. Both Console Application and Powershell Script is OK for this.

这篇关于如何将构建变量永久保存为构建步骤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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