Skip to content

Commit 82cf8d0

Browse files
alfsbAndré L F S Bacci
andauthored
Show repository status on build logs. (#104)
Co-authored-by: André L F S Bacci <[email protected]>
1 parent 4269a93 commit 82cf8d0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

configure.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,24 @@ function generate_sources_file() // {{{
614614
'scripts/file-entities.php.in',
615615
);
616616

617+
// Show local repository status to facilitate debug
618+
619+
$repos = array();
620+
$repos['doc-base'] = $ac['basedir'];
621+
$repos['en'] = "{$ac['rootdir']}/{$ac['EN_DIR']}";
622+
$repos[$ac['LANG']] = "{$ac['rootdir']}/{$ac['LANG']}";
623+
$repos = array_unique($repos);
624+
625+
foreach ($repos as $name => $path)
626+
{
627+
$output = str_pad( "$name:" , 10 );
628+
$output .= `cd $path; git rev-parse HEAD;`;
629+
$output .= `cd $path; git status -s;`;
630+
$output .= `cd $path; git for-each-ref --format="%(push:track)" refs/heads`;
631+
echo trim($output) . "\n";
632+
}
633+
echo "\n";
634+
617635
foreach ($infiles as $in) {
618636
$in = chop("{$ac['basedir']}/{$in}");
619637

0 commit comments

Comments
 (0)