How are JetBrains generating TC build numbers for Kotlin?
Answered
Hi,
I'm curious to know how the build numbers in TC are being controlled for the Kotlin projects. An example here: https://teamcity.jetbrains.com/viewType.html?buildTypeId=bt345
It seems branches tagged with a version number are marked as "eap", whilst the rest are marked as "dev". Can anyone share some insight on this?
Thanks,
Joe.
Please sign in to leave a comment.
Hello,
The build numbers for release branches are controlled from scripts in one of the configuration steps. The script takes the latest known build number in a branch, increments it, and overrides default auto-incremented build number. It's not a beautiful solution and it has several known issues, but at some point, it was important to have all builds grouped in one place and store them in one configuration to simplify dependency management.
Major issues of this solution are:
- When the build starts it has wrong build number, that will be changed later
- Two builds may have same build number if one started before the other had finished
Relevant code:
https://github.com/JetBrains/kotlin/blob/master/update_dependencies.xml#L946
https://github.com/JetBrains/kotlin/blob/master/generators/infrastructure/increment-version.kts