2

We have recently moved from Team Foundation Server (TFS) source control to Git source control. We are using TeamCity as our build server.

Our build number format in TeamCity is defined as this:

%env.Release%.%env.Patch%.%build.counter%.%build.vcs.number%

This gives us a build number like this:

24.9.2.34561

But after moving to GIT our build number looks like this:

29.4.179.4d549289e564929454d1e783319e2c3e5b45cd71

Can anyone tell me how to setup TeamCity to generate build number like this when using GIT source control:

xx.xx.xx.xxxxxx
0

1 Answer 1

0

Currently, the short version of the Git commit hash isn't available via a predefined build parameter. There is a related feature request in TeamCity issue tracker though: https://youtrack.jetbrains.com/issue/TW-22082.

From from a comment in the tracker, the current workaround is to get the necessary hash inside the build script from the passed revision and change the build number via a service message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .