Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuous integration and software versioning

I like the idea of automatically versioning my builds but I'm not sure what the right way is to get the AssemblyInfo.cs change back into source control (or should it not go into source control?). Is this something the CI server should be committing automatically for each build?

Using Bamboo at the moment.

like image 653
Joe Phillips Avatar asked Mar 09 '26 16:03

Joe Phillips


1 Answers

We are using Teamcity as our CI server, and it comes with a feature called AssemblyInfo patcher

What this does, is temporarily add the teamcity build number in Assemblyinfo.cs, build generate the artifact and then revert the change. This way the generated artifact has the same version as the build number.

Source control can have the assemblyinfo.cs version entry as the current revision the developers are working on, with '*' as the build number. This can be updated after every release.

Edit 1: Since you are using Bamboo, here is a link that describes one way of setting the build number in the generated artifact in bamboo, without having to check-in the AssemblyInfo.cs.

like image 146
Srikanth Venugopalan Avatar answered Mar 11 '26 04:03

Srikanth Venugopalan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!