From 299b24893296298159e9615d71d14994abff503b Mon Sep 17 00:00:00 2001 From: Gregor Date: Fri, 12 Jul 2019 21:52:33 +0200 Subject: [PATCH] Cover for failed RELEASE_DTS calculation --- tools/update_buildinfo.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/update_buildinfo.sh b/tools/update_buildinfo.sh index 426b11f8..117ff0f1 100755 --- a/tools/update_buildinfo.sh +++ b/tools/update_buildinfo.sh @@ -7,7 +7,10 @@ BUILD_DATE="$(date "+%Y-%m-%d %H:%M")" COMMIT_ID="$(git rev-parse HEAD)" BRANCH="$(git rev-parse --abbrev-ref HEAD | sed -r 's/[\/\\]+/_/g')" RELEASE="$(git describe --tags --long | sed -r 's/(.*)-(.*)-.*/\1 +\2/g' | sed 's/ +0$//')" -RELEASE_DTS=0$(git show -s --format=%cd --date=format:"%Y%m%d%H%M" HEAD) +RELEASE_DTS=$(git show -s --format=%cd --date=format:"%Y%m%d%H%M" HEAD) +if [ -z "$RELEASE_DTS"]; then + RELEASE_DTS=0 +fi # figure out whether SSL is enabled in user_config.h if grep -Eq "^#define CLIENT_SSL_ENABLE" $USER_CONFIG_H; then