enwikipedia-acc /
waca
| 1 | <?php |
||
| 2 | /****************************************************************************** |
||
| 3 | * Wikipedia Account Creation Assistance tool * |
||
| 4 | * ACC Development Team. Please see team.json for a list of contributors. * |
||
| 5 | * * |
||
| 6 | * This is free and unencumbered software released into the public domain. * |
||
| 7 | * Please see LICENSE.md for the full licencing statement. * |
||
| 8 | ******************************************************************************/ |
||
| 9 | |||
| 10 | namespace Waca; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Class providing information about the tool's runtime environment |
||
| 14 | */ |
||
| 15 | class Environment |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string Cached copy of the tool version |
||
| 19 | */ |
||
| 20 | private static $toolVersion = null; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Gets the tool version, using cached data if available. |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | public static function getToolVersion() |
||
| 27 | { |
||
| 28 | if (self::$toolVersion === null) { |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 29 | self::$toolVersion = exec("git describe --always --dirty"); |
||
| 30 | } |
||
| 31 | |||
| 32 | return self::$toolVersion; |
||
| 33 | } |
||
| 34 | } |
||
| 35 |