Merge pull request #3527 from tlenss/master
Fix #3521 version mismatch when running diag, Replaced git command to ge...pull/3538/head
commit
6cbf0d9ae0
|
@ -55,9 +55,12 @@ class Compiler
|
||||||
$date->setTimezone(new \DateTimeZone('UTC'));
|
$date->setTimezone(new \DateTimeZone('UTC'));
|
||||||
$this->versionDate = $date->format('Y-m-d H:i:s');
|
$this->versionDate = $date->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
$process = new Process('git describe --tags HEAD');
|
$process = new Process('git name-rev --tags --name-only $(git rev-parse HEAD)');
|
||||||
if ($process->run() == 0) {
|
if ($process->run() == 0) {
|
||||||
$this->version = trim($process->getOutput());
|
$output = trim($process->getOutput());
|
||||||
|
if ($output != 'undefined') {
|
||||||
|
$this->version = $output;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// get branch-alias defined in composer.json for dev-master (if any)
|
// get branch-alias defined in composer.json for dev-master (if any)
|
||||||
$localConfig = __DIR__.'/../../composer.json';
|
$localConfig = __DIR__.'/../../composer.json';
|
||||||
|
|
Loading…
Reference in New Issue