We use gitflow and TeamCity to develop many of our products. We also need to support multiple releases at the same time and work on the next release.
We use support branches for previous releases and develop and master as our current and future releases which is pretty standard I think.
Is there an easy way to have a build counter set up in TeamCity for each branch without needing to check this into the repo or having different configs for each release?
For instance I want my version on one support branch I want 1.0.1.(count of builds for version 1), on develop/master I want 2.0.0.(count of builds for version 2).
I know I can check the version in at the end of the build but was hoping there was a nicer way, we don't check anything in at the moment.
No, not that I'm aware of. Currently (in TC 9.0), each branch uses the same build config. The only way I know to do what you're asking is to create a template (so all build steps would use the same template to avoid duplication) then create multiple build configs, each linked to a particular branch of the VCS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!Donate Us With