make-version: use 0 as number of commits if they can't be obtained.
When running on gitlab-ci, the checkout of the project doesn't give a complete repo. Then git describe fails at giving the number of commits. In this case just use 0 instead of NULL.
This commit is contained in:
parent
5227f385b8
commit
29b331bf0c
|
@ -188,7 +188,7 @@ sub read_repo_info {
|
|||
if ($? == 0 && length($line) > 1) {
|
||||
my @parts = split(/-/, $line);
|
||||
$git_description = $line;
|
||||
$num_commits = $parts[-2];
|
||||
$num_commits = $parts[-2] ? $parts[-2] : "0";
|
||||
$commit_id = $parts[-1];
|
||||
|
||||
if ($line =~ /v\d+\.\d+\.\d+(rc\d+)-/) {
|
||||
|
|
Loading…
Reference in New Issue