在摇篮访问TeamCity的版本号生成脚本 [英] Accessing Teamcity build number in Gradle build script

查看:284
本文介绍了在摇篮访问TeamCity的版本号生成脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何可以访问由TeamCity的执行的摇篮脚本的版本号和VCS检出多少?

How can I access the build number and VCS checkout number in a Gradle script executed by Teamcity?

在蚂蚁我可以使用 $ {build.number} $ {build.vcs.number.1} 分别。

In Ant I can use ${build.number} and ${build.vcs.number.1} respectively.

感谢您。

推荐答案

这些仅仅是TeamCity的设置为Ant /摇篮JVM JVM系统属性。你可以用通常的Java方式访问它们,例如 System.getProperty(build.number)

These are simply JVM system properties that TeamCity sets for the Ant/Gradle JVM. You can access them with the usual Java means, for example System.getProperty("build.number").

这篇关于在摇篮访问TeamCity的版本号生成脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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