aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@verizonmedia.com>2019-08-28 09:17:25 +0200
committerArnstein Ressem <aressem@verizonmedia.com>2019-08-28 09:17:25 +0200
commit1a50010feff03e06090ec245089f0cb3eeb2912d (patch)
tree1c768c67dfc1b00e2f8ab4fa8d71932d26d3e497 /dist
parentbd65431ca39696ec242d63e4d378bae1a333e0c9 (diff)
Set dummy commit ref and date 0 when git is not available in tree.
Diffstat (limited to 'dist')
-rwxr-xr-xdist/getversion.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/getversion.pl b/dist/getversion.pl
index d29e7d12aa3..f3753373d8d 100755
--- a/dist/getversion.pl
+++ b/dist/getversion.pl
@@ -67,8 +67,8 @@ if ($printmap) {
chomp($ostype = `uname -s`);
chomp($osver = `uname -r`);
chomp($osarch = `uname -m`);
- chomp($commit_sha = `sh -c "cd ${srcdir} && git rev-parse HEAD"`);
- chomp($commit_date = `sh -c "cd ${srcdir} && git show -s --format=%ct ${commit_sha}"`);
+ chomp($commit_sha = `sh -c "(cd ${srcdir} && git rev-parse HEAD) || echo ffffffffffffffffffffffffffffffffffffffff "`);
+ chomp($commit_date = `sh -c "(cd ${srcdir} && git show -s --format=%ct ${commit_sha}) || echo 0"`);
$vtag_system_rev = $ostype . "-" . $osver;
chomp ($who = `(whoami || logname) 2>/dev/null`);