Skip to content

Commit

Permalink
Show repository status on build logs. (#104)
Browse files Browse the repository at this point in the history
Co-authored-by: André L F S Bacci <ae@php.net>
  • Loading branch information
alfsb and André L F S Bacci authored Nov 2, 2023
1 parent 4269a93 commit 82cf8d0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,24 @@ function generate_sources_file() // {{{
'scripts/file-entities.php.in',
);

// Show local repository status to facilitate debug

$repos = array();
$repos['doc-base'] = $ac['basedir'];
$repos['en'] = "{$ac['rootdir']}/{$ac['EN_DIR']}";
$repos[$ac['LANG']] = "{$ac['rootdir']}/{$ac['LANG']}";
$repos = array_unique($repos);

foreach ($repos as $name => $path)
{
$output = str_pad( "$name:" , 10 );
$output .= `cd $path; git rev-parse HEAD;`;
$output .= `cd $path; git status -s;`;
$output .= `cd $path; git for-each-ref --format="%(push:track)" refs/heads`;
echo trim($output) . "\n";
}
echo "\n";

foreach ($infiles as $in) {
$in = chop("{$ac['basedir']}/{$in}");

Expand Down

0 comments on commit 82cf8d0

Please sign in to comment.