Setting Teamcity version number with counter from file

China☆狼群 提交于 2019-12-04 15:41:57

TeamCity has a build number which it places into the environment while running your build script.

You can access the environment variable BUILD_NUMBER and append it to your actual version number. Then echo it back to TeamCity. I assume this would be available via ${sys.env.BUILD_NUMBER}.

So perhaps:

<echo message="##teamcity[buildNumber '${versionNo}.${sys.env.BUILD_NUMBER}']"></echo> 

PS. There really is no reason to change the build number in teamcity like they do in that article. You can leave it {0}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!