BUG 6649 reporting git branch and tag for developmente

improving to show the number of commits after last tag.
This commit is contained in:
Fernando Ontiveros
2011-04-01 16:27:45 -04:00
parent 99be8f452c
commit 3d46ebae6d

View File

@@ -43,6 +43,11 @@ if (! defined ( 'PM_VERSION' )) {
else {
$cmd = sprintf ("cd %s && git status | grep 'On branch' | awk '{print $3 $4} ' && git log --decorate | grep '(tag:' | head -1 | awk '{print $3$4} ' ", PATH_TRUNK);
if ( exec ( $cmd , $target) ) {
$cmd = sprintf ("cd %s && git log --decorate | grep '(tag:' | head -1 | awk '{print $2} ' ", PATH_TRUNK);
$commit = exec ( $cmd , $dummyTarget);
$cmd = sprintf ("echo ' +' && cd %s && git log %s.. --oneline | wc -l && echo ' commits.'", PATH_TRUNK, $commit );
exec ( $cmd , $target) ;
//$target[] = "+ 343 commits";
define ( 'PM_VERSION', implode(' ', $target) );
}
else