4

I'm using Teamcity to build with an Ant runner.

I'm trying to pass the current build counter into the "Additional Ant command line parameters" using the following

-lib %teamcity.build.checkoutDir%/MI/CustomAntTasks/jars/CustomAntTasks.jar -Dlabel={0}

The value -Dlabel={0} is being passed into the Ant script as the literal value {0} and not the current value of the build counter.

Any ideas on how I can correctly pass through the build counter (not the build number)?

Pram
  • 2,261
  • 3
  • 31
  • 50

1 Answers1

1

I believe that it is accessible via the build-in parameter, i.e. you don't need to try to pass it in.

${build.number}

There are other values too: Predefined Build Parameters

GreenKiwi
  • 1,025
  • 13
  • 28