From 1c5e9a49c1913d7e8434afdcb9cdbea5f274fbde Mon Sep 17 00:00:00 2001 From: Kamil Jires Date: Mon, 10 May 2021 02:34:53 +0200 Subject: [PATCH] add condition for the COMMIT_DATE environment variable --- tools/perf-test/perf-test-process.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf-test/perf-test-process.sh b/tools/perf-test/perf-test-process.sh index 1385e3c525a..9a47700d532 100644 --- a/tools/perf-test/perf-test-process.sh +++ b/tools/perf-test/perf-test-process.sh @@ -38,7 +38,8 @@ else GIT_COMMIT=$(basename $TGZFILE | cut -d- -f5 | cut -d. -f1) fi -COMMIT_DATE=$(git show -s --format=%cI "${GIT_COMMIT}") +# check for commit date in case the date is not already set +: "${COMMIT_DATE:=$(git show -s --format=%cI "${GIT_COMMIT}")}" # load to DB BUILD_ID=$(psql -tc "select id from mst_build where commit_hash='${GIT_COMMIT}'")