6

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.

Ben Chester
  • 129
  • 4
  • 12

1 Answers1

5

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.

Community
  • 1
  • 1
Anew
  • 5,175
  • 1
  • 24
  • 36
  • 1
    This is pretty much exactly what i needed, i followed the link in the edit, configured teamcity correctly, got the correct project ID and set it running on our CI. Side note: if you have guest account enabled on teamcity, you can curl it with -user guest:guest to get access. Build data is available via guest. Also if you cannot get git working for whatever reason, the commit messages are available in the xml API in teamcity, poke around and you can follow it through a few links. – Ben Chester Feb 12 '13 at 13:39