We want a semantic version build number derived from the most recent git tag that follows a three-node semantic version format. We use GitLab and here’s how we do that in TeamCity. 1. Add a Powershell build step as follows: $lastVerTag = git describe --abbrev=0 --tags --match [0-99][.][0-99][.][0-999] [string]$majMin = $lastVerTag.Substring(0,$la... [int]$incr = $lastVerTag.Substring($last... $incr = $incr + 1 $semVer = $majMin + '.' + $incr $Hash = "%build.vcs.number%" ......