3 comments
Comment actions Permalink
HiMaybe you can explain what you are trying to achieve? (there could be another way).I don't think you can stop the internal build number from incrementing, but the actual {Build.number} can be generated by you in the build script, so you can decide what values it has and if it is incremented.Then you publish it to teamcity in the build script (from Ant for example):<echo message="##teamcity[buildNumber '${mybuild}']"/>ziv shapira
0
Comment actions Permalink

We have a configuration that make a weekly build that will be pushed to NuGet.
For this the build number should increment by one each week.
When the current version is 0.0.0.1 and I have a failing build the version is incremented to 0.0.0.2. Now I fix the build and the release version is 0.0.0.3, but it should still be 0.0.0.2.

0
Comment actions Permalink

One way to do this is to have a dependency project , who's sole purpose is to increment the build number

In your project you references the build number from this project

E.g. Set the build number in your project to   0.0.0.%dep.btXX.build.number%  where btXX is the project number team city assigns to the build number increment  project.

You set the dependency of the build number increment project to only run on a successful build of the actual project.

0

Please sign in to leave a comment.