calculated git versions of project & system, linked them hardcoded

This commit is contained in:
Ulf Gebhardt 2015-06-16 04:09:00 +02:00
parent c4d0082a69
commit 8fafd737a4

View File

@ -12,12 +12,14 @@ class saimod_sys_git extends \SYSTEM\SAI\SaiModule {
$result = array('git_project' => '', 'git_system' => '');
try{
$repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH));
$result['git_project'] = '<a href="http://www.mojotrollz.eu/git/hosting/commit/'.$repo->run('rev-parse HEAD').'" target="_blank">'.$repo->run('rev-parse --short HEAD').'</a>';
} catch (\Exception $ex) {
$result['git_project'] = $ex->getMessage();
}
try{
$repo = \SYSTEM\GIT\Git::open(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL));
$result['git_system'] = '<a href="http://www.mojotrollz.eu/git/system/commit/'.$repo->run('rev-parse HEAD').'" target="_blank">'.$repo->run('rev-parse --short HEAD').'</a>';
} catch (\Exception $ex) {
$result['git_system'] = $ex->getMessage();
}