简体   繁体   English

竹版本

[英]Bamboo Versioning

I have a situation where i need to maintain version information of my builds. 我有一种情况,我需要维护我的版本的版本信息。 By googling i found limited information. 通过谷歌搜索我发现有限的信息。 one way is to create a version file on source control and keep updating. 一种方法是在源代码控制上创建一个版本文件并继续更新。 other is to use the source control revision number. 另一种是使用源代码控制版本号。 final one is to use bamboo build number. 最后一个是使用竹编号。 i haven't implemented anyone of this before. 我以前没有实现任何这个。 colud anyone point out the pros and cons of each method. colud任何人指出每种方法的利弊。

Thank you, Reddy. 谢谢你,雷迪。

Please atleast tell me which method have u used to implement the same. 请至少告诉我你用哪种方法实现同样的方法。 Thnq.. Thnq ..

Visit http://confluence.atlassian.com/display/BAMBOO011/1.2.1+Using+Custom+Variables for more information about bamboo variables. 有关竹变量的更多信息,请访问http://confluence.atlassian.com/display/BAMBOO011/1.2.1+Using+Custom+Variables Remember to define a system property in your job configuration like this: -DbambooBuildNumber=${bamboo.buildNumber} then you can use this property bambooBuildNumber in your maven or ant configuration file. 请记住在您的作业配置中定义系统属性,如下所示: -DbambooBuildNumber=${bamboo.buildNumber}然后您可以在maven或ant配置文件中使用此属性bambooBuildNumber

Good question. 好问题。 I've done this in kind of an ad-hoc manner before. 我之前以某种临时方式做过这件事。 I don't strongly advocate the following approach, but I'll list it anyway for comparison with the (I hope) better approaches that others will soon be posting. 我并没有强烈提倡以下方法,但无论如何我都会将其列为与其他人即将发布的(我希望)更好的方法进行比较。

In order to maintain the version information in a medium sized Java codebase, I created a simple class to hold the major, minor, and revision version numbers as static constants and produce a formatted version string. 为了在中型Java代码库中维护版本信息,我创建了一个简单的类来将主要版本,次要版本和修订版本号码保存为静态常量,并生成格式化版本字符串。 I then created a perl script to check the class out of version control, replace the version components with those specified as arguments to the script, and check it back in. 然后,我创建了一个perl脚本来检查版本控制中的类,将版本组件替换为指定为脚本参数的版本组件,然后重新检入。

The script does most of the work, so the process of updating the version is fairly simple and quick. 该脚本完成了大部分工作,因此更新版本的过程非常简单快捷。 I had to implement this quickly, so there are probably better ways of doing it. 我必须快速实现这一点,所以可能有更好的方法。 I just didn't have time, or motivation, to research better alternatives. 我没有时间或动力来研究更好的替代品。

I'm not entirely sure what your question is but I'm assuming you want build numbers? 我不完全确定你的问题是什么,但我假设你想要内置号码? When you build your project with Ant you can use the BuildNumber task to keep track of build numbers. 使用Ant构建项目时,可以使用BuildNumber任务来跟踪构建号。

The following link is a pretty good article. 以下链接是一篇非常好的文章。 If you can get all the plugins working with the version of Bamboo you're on it should be fine. 如果您可以使用所有使用Bamboo版本的插件,那么它应该没问题。

Release Management with Atlassian Bamboo (outdated) 使用Atlassian Bamboo进行发布管理 (过时)

Release Management with Atlassian Bamboo via the Internet Archive 通过Internet Archive使用Atlassian Bamboo进行发布管理

you can use ${bamboo.buildNumber} in ant 你可以在ant中使用$ {bamboo.buildNumber}

look at the following thread http://forums.atlassian.com/thread.jspa?messageID=257319944 看看以下主题http://forums.atlassian.com/thread.jspa?messageID=257319944

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM