예제 #1
0
 public static function getVersion()
 {
     if (self::$version === NULL) {
         $cwd = getcwd();
         chdir(__DIR__ . '/../..');
         $devNull = strtolower(substr(PHP_OS, 0, 3)) == 'win' ? 'NUL' : '/dev/null';
         $git = exec('command -p git describe --always --dirty 2>' . $devNull, $foo, $rc);
         chdir($cwd);
         if ($rc === 0) {
             self::$version = $git;
         }
     }
     return self::$version;
 }
예제 #2
0
파일: Version.php 프로젝트: sakshika/ATM
 public static function getVersion()
 {
     if (self::$version === NULL) {
         self::$version = PHPDOX_VERSION;
         if (PHPDOX_VERSION == '%development%') {
             $cwd = getcwd();
             chdir(__DIR__);
             $git = exec('command -p git describe --always --dirty 2>/dev/null', $foo, $rc);
             chdir($cwd);
             if ($rc === 0) {
                 self::$version = $git;
             }
         }
     }
     return self::$version;
 }