Modify artifact version based on git branch

Answered

Ive just configured TeamCity to use versioned settings, and now I'm trying to configure our Java/Maven builds to produce an artifact with the version string (ultimately artifact name) to include the branch name and -SNAPSHOT (factoring in the TC build number, so something like name-branch-1.46-SNAPSHOT.jar) on all branches except master, where we publish an artifact-1.X.jar where X is the TC Build number (no branch no, drop the -SNAPSHOT).  I'm playing around in the Kotlin stuff (settings.kts) and I see that I can add a 'script' step inside the steps{} block, but is there a way to do this with just Kotlin - I don't see a kotlin build step, just a script step, and a powershell step.

0
1 comment

Should I just define my old BuildStep class and use that?

0

Please sign in to leave a comment.