From de8ecea02510821c9b99b6df931ee80df28dce71 Mon Sep 17 00:00:00 2001 From: Dima Korolev Date: Sat, 10 Aug 2024 20:09:08 +0200 Subject: [PATCH] Fixed `gen-current-build.sh`. --- scripts/gen-current-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gen-current-build.sh b/scripts/gen-current-build.sh index 484cc05b..5ba2e4c3 100755 --- a/scripts/gen-current-build.sh +++ b/scripts/gen-current-build.sh @@ -15,9 +15,9 @@ if [[ $? -ne 0 ]]; then fi COMPILER_INFO=${COMPILER_INFO//$'\n'/\\n} # JSON-friendly newlines. -GIT_COMMIT="$(git rev-parse HEAD 2>/dev/null || echo '')" -GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')" -GIT_STATUS="$(git status 2>/dev/null || echo '')" +GIT_COMMIT="$( (git rev-parse HEAD 2>/dev/null || echo '') | tail -n 1)" +GIT_BRANCH="$( (git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '') | tail -n 1)" +GIT_STATUS="$( (git status 2>/dev/null || echo '') | tail -n 1)" # NOTE(dkorolev): Removing the commands that may potentially run for a long time. #GIT_DIFF_NAMES_MULTILINE="$(git diff --name-only 2>/dev/null || echo '')"