Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Teamcity git Change log in a build step

Tags:

git

bash

teamcity

As part of a build step where i publish the build i would like to get access to the changelog for the particular build. Specifically the git commit messages.

Im not sure if i can do this via git in a build step or making the change log a paramter i can access. Any help is appreciated.

like image 499
Ben Chester Avatar asked Feb 08 '13 13:02

Ben Chester


1 Answers

git log is likely your answer:

anew@Wintermute$ git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short
* 8e11818 2013-02-05 | Add first rough prototype of json controller. Add naive first model as a placeholder. Add separate contexts
* 6570201 2013-01-30 | Remove DAO layer. Preparation for graph data layer. [4n3w]
* a079c87 2013-01-30 | Cleanup. Wish I had more time for this! [4n3w]

Edit: I found this How to compose git log for pending changes in TeamCIty which may be a duplicate of what you're trying to do.

like image 121
Anew Avatar answered Sep 22 '22 13:09

Anew