Levvy
Levvy

Reputation: 1150

How to make TeamCity artifacts containing build number?

I want an artifact name for e.g. game-1.0.%BuilNumber%.jar where BuildNumber is number of teamcity build.

I am using gradle to build artifacts. Is it with that tool possible or is there another way?

Upvotes: 1

Views: 1021

Answers (1)

Mark Vieira
Mark Vieira

Reputation: 13466

Teamcity exposes build parameters via a Gradle project property called teamcity. This would allow you to do something like:

jar {
    version += '.' + teamcity['build.number']
}

Upvotes: 2

Related Questions