BUG 6649 reporting git branch and tag for developmente

this will report the git branch and tag only for development
This commit is contained in:
Fernando Ontiveros
2011-04-01 16:00:58 -04:00
parent 79b4020ef3
commit 99be8f452c

View File

@@ -41,7 +41,12 @@ if (! defined ( 'PM_VERSION' )) {
include (PATH_METHODS . 'login/version-pmos.php');
}
else {
define ( 'PM_VERSION', 'Development Version' );
$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) ) {
define ( 'PM_VERSION', implode(' ', $target) );
}
else
define ( 'PM_VERSION', 'Development Version' );
}
}