Search code examples
gitbashcontinuous-integrationhudsonphing

How to generate changelog: git log since last Hudson build?


I'm using Phing to do post build tasks in Hudson.

I want to generate changelog containing all commits since last successful Hudson build. But looks like neither Hudson nor Git plugin for Hudson does not provide %last_build_time% variable.

This would be satisfying solution, (but how to get the time?):

git log --pretty="%s" --since="%last_build_time%"

The only way I see for now is extracting it from the job xml file, but I do not know if it is possible with Phing.

How do you generate your change logs?


Solution

  • I have extracted last successful build date using bash:

    git log --pretty="%s" --since="`date -r ./../lastSuccessful/build.xml "+%F %T"`"
    

    (In xml file I had to replace " with &quote; entity).