简体   繁体   中英

Semantic versioning automation

After I've read this article and another ones, I figure out versioning is a programmer decision , so I believe CI system isn't able to understand which's version of this package ( CI system isn't able to understand whether the pulled commit is a patch, a new feature ).

However, a programmer isn't able to know how to link the patch (bug, feature and so on) to a release built number identification .

According to semantic versioning:

  • increment the patch version (eg from 2.3.4 to 2.3.5) when you only release bug fixes and the like
  • increment the minor version (eg from 1.3.2 to 1.4.0) when you add new features
  • increment the major version (eg from 3.2.9 to 4.0.0) when you introduce breaking changes

My semantic verion is going to follow next pattern: 1.2.3+7489ab44d3 , where 1 is MAJOR version number, 2 is MINOR version number and 3 is patch or bug number. then the +7489ab44d3 will be the built job identification on CI system.

So, the first part of this pattern depends of an human brain and the last one is under a CI system.

I've read also, it would be possible to use an issue tracker system in order to sort out each issue under a some kind of information and provide it to CI system.

Which is the best way for providing an automation in order to achieve that?

We are using plugin to do it.

https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin

We know what is the version based upon the branch name and based upon it we generate the appropriate build number.

Its a separate task in the build procedure and you can achieve it with several systems and plugins.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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