summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-08-31 14:51:01 +0200
committerYorhel <git@yorhel.nl>2020-08-31 14:51:17 +0200
commit4e6f3a84598d70bc4303ba4800b66663e95a3dde (patch)
tree130f1a036187d64f3eb771daaad98a9e6ea6efc2
parent16547941c340ba21566e358d8d9541c8e59fffac (diff)
Config: Fix extraction of version when there is no commit ID in git describe
...which happens when I tag a new release. And let's tag this 2.28.
-rw-r--r--lib/VNDB/Config.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Config.pm b/lib/VNDB/Config.pm
index b187251a..6a1d8adf 100644
--- a/lib/VNDB/Config.pm
+++ b/lib/VNDB/Config.pm
@@ -55,7 +55,7 @@ sub config {
$c->{tuwf}{$_} = $config_file->{tuwf}{$_} for keys %{ $config_file->{tuwf} || {} };
$c->{url_static} ||= $c->{url};
- $c->{version} ||= `git -C "$ROOT" describe` =~ /^(.+)\-g[0-9a-f]+$/ && $1;
+ $c->{version} ||= `git -C "$ROOT" describe` =~ s/\-g[0-9a-f]+$//rg =~ s/\r?\n//rg;
$c->{root} = $ROOT;
$c->{Multi}{Core}{log_level} ||= 'debug';
$c->{Multi}{Core}{log_dir} ||= $ROOT.'/data/log';