如何生成的changelog:git的日志自去年哈德森建立? [英] How to generate changelog: git log since last Hudson build?

查看:216
本文介绍了如何生成的changelog:git的日志自去年哈德森建立?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Phing做后生成任务哈德森。

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

我要生成包含自上次成功哈德森构建所有提交的changelog。不过貌似既不哈德森也不Git的插件哈德森不提供%last_build_time%变量。

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%"

我看到现在唯一的办法就是从作业XML文件中提取它,但我不知道是否有可能与Phing。

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?

推荐答案

我已经提取使用bash上次成功生成日期:

I have extracted last successful build date using bash:

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

(XML文件中我不得不更换&放大器;报价; 实体)。

这篇关于如何生成的changelog:git的日志自去年哈德森建立?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆