13 lines
250 B
PHP
13 lines
250 B
PHP
<?php
|
|
|
|
function app_version() {
|
|
$ver = exec("git describe --tags");
|
|
$ver = explode("-",$ver);
|
|
if (count($ver)>1) {
|
|
$ver = array_slice($ver,0,2);
|
|
}
|
|
return join(".",$ver);
|
|
}
|
|
|
|
printf("%s=%s\n", "APP_VERSION", app_version());
|