Changeset 89fc59d in github


Ignore:
Timestamp:
May 8, 2012 6:09:40 AM (13 months ago)
Author:
Aleksander Machniak <alec@…>
Branches:
release-0.8
Children:
e44e5cc
Parents:
ef92c511
git-author:
Aleksander Machniak <alec@…> (05/06/12 08:21:18)
git-committer:
Aleksander Machniak <alec@…> (05/08/12 06:09:40)
Message:

Print last commit date as (git) version

Conflicts:

program/include/rcube_template.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_template.php

    rce64332 r89fc59d  
    779779                        if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs)) 
    780780                          $ver .= ' [SVN r'.$regs[1].']'; 
     781                    } 
     782                    else if (is_file(INSTALL_PATH . '.git/index')) { 
     783                        if (preg_match('/Date:\s+([^\n]+)/', @shell_exec('git log -1'), $regs)) { 
     784                            if ($date = date('Ymd.Hi', strtotime($regs[1]))) { 
     785                                $ver .= ' [GIT '.$date.']'; 
     786                            } 
     787                        } 
    781788                    } 
    782789                    $content = Q($ver); 
Note: See TracChangeset for help on using the changeset viewer.