mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 11:23:54 +01:00
skip (rebased) commits older than the last tag
This commit is contained in:
parent
5dbebb9306
commit
1fb5d604a6
@ -223,9 +223,16 @@ function get_changelog_from_git($_path, $log_pattern=null, &$last_tag=null, $pre
|
|||||||
$output = null;
|
$output = null;
|
||||||
run_cmd($cmd, $output);
|
run_cmd($cmd, $output);
|
||||||
|
|
||||||
|
$date_last_tag = new DateTime(preg_replace('/^\d+\.\d+\./', '', $last_tag));
|
||||||
foreach($output as $line)
|
foreach($output as $line)
|
||||||
{
|
{
|
||||||
if (substr($line, 0, 4) == " " && ($msg = _match_log_pattern(substr($line, 4), $log_pattern, $prefix)))
|
if (substr($line, 0, 8) === "Date: ")
|
||||||
|
{
|
||||||
|
$date_commit = new DateTime(substr($line, 8));
|
||||||
|
}
|
||||||
|
if (substr($line, 0, 4) == " " &&
|
||||||
|
$date_commit > $date_last_tag && // skip (rebased) commits older than the last tag
|
||||||
|
($msg = _match_log_pattern(substr($line, 4), $log_pattern, $prefix)))
|
||||||
{
|
{
|
||||||
$changelog .= $msg."\n";
|
$changelog .= $msg."\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user