3

I have a number of build configurations in TeamCity that are built into NuGet packages. At the moment, I am using the branch name as part of the version for NuGet, thus marking the package as experimental. So if a package is built from the feature1 branch, the version looks something like:

1.2.3-feature1

This is a great way to keep branch work apart from the release branch. The problem that I have now is that I want to use the same build configuration for the release branch, but have the NuGet version not be experimental. So when the package is built from default (I'm on HG), then the version is simply:

1.2.3

There is a TeamCity parameter indicating if the branch is default (Branch Related Parameters), but I don't know how to get a parameter to be empty if the default is true, the branch name if false.

Is this possible?

Erick T
  • 7,009
  • 9
  • 50
  • 85

0 Answers0