How to get info about changes in build into commandline arguments

When running a build on Teamcity, the build server has a state about the changes included in this build, compared to the last one:

Is there some way to retrieve this information and pass it as a command-line argument? Either as a comma-separated list of hashes or just the hash of the oldest commit? I was looking for a teamcity-parameter, but have not been able to find one.

VCS in question here: Git

What I am trying to "solve": I run Nuke Build scripts and would like to let some targets be conditionally run based on if one or more of the commits have changes to certain files. I cannot use TeamCity's own trigger, as it is not the entire build that should be conditionally run.

Please sign in to leave a comment.