php-makephar/props.php

13 lines
250 B
PHP
Raw Permalink Normal View History

2017-02-12 01:32:17 +00:00
<?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());