use dash instead of space when invoking git to get version

This commit is contained in:
Andrew Dolgov 2021-03-02 07:35:20 +03:00
parent 031ee47a3e
commit 51ed72efab
1 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ class Config {
"timestamp" => 0, "timestamp" => 0,
]; ];
$proc = proc_open("git --no-pager log --pretty=\"%ct %h\" -n1 HEAD", $proc = proc_open("git --no-pager log --pretty=\"%ct-%h\" -n1 HEAD",
$descriptorspec, $pipes, $dir); $descriptorspec, $pipes, $dir);
if (is_resource($proc)) { if (is_resource($proc)) {
@ -193,7 +193,7 @@ class Config {
$rv["status"] = $status; $rv["status"] = $status;
if ($status == 0) { if ($status == 0) {
list($timestamp, $commit) = explode(" ", $stdout); list($timestamp, $commit) = explode("-", $stdout);
$rv["version"] = strftime("%y.%m", (int)$timestamp) . "-$commit"; $rv["version"] = strftime("%y.%m", (int)$timestamp) . "-$commit";
$rv["commit"] = $commit; $rv["commit"] = $commit;