简体   繁体   中英

Different TeamCity build counter per git branch

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.

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