Skip to content

Commit

Permalink
Fixed gen-current-build.sh to always output one line (ugly).
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorolev committed Jul 31, 2024
1 parent 5e1dd04 commit b37d9c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/gen-current-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<not under git>')"
GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '<not under git>')"
GIT_STATUS="$(git status 2>/dev/null || echo '<not under git>')"
GIT_COMMIT="$($(git rev-parse HEAD 2>/dev/null || echo '<not under git>') | tail -n 1)"
GIT_BRANCH="$($(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '<not under git>') | tail -n 1)"
GIT_STATUS="$($(git status 2>/dev/null || echo '<not under git>') | 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 '<not under git>')"
Expand Down

0 comments on commit b37d9c3

Please sign in to comment.