From 291d5569a80086334fe65eaf515a2080d1487f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Sat, 22 Jun 2019 10:29:40 +0200 Subject: [PATCH 1/2] fix(build.sh): Cosmetic spacing fix Iterm has an issue with rendering multi byte unicode chars. This commit adds an extra space to certain emojis on iterm only. This fixes current rendering issues on Linux term because that extra space was added previously unconditionally. --- hack/build.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hack/build.sh b/hack/build.sh index a5f5919ca6..44daa6a3d0 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -25,6 +25,11 @@ fi set -eu +# Temporary fix for iTerm issue https://gitlab.com/gnachman/iterm2/issues/7901 +S="" +if [ -n "$ITERM_PROFILE" ]; then + S=" " +fi # Run build run() { # Switch on modules unconditionally @@ -73,7 +78,7 @@ run() { } go_fmt() { - echo "🧹 Format" + echo "🧹 ${S}Format" go fmt ./cmd/... ./pkg/... } @@ -88,7 +93,7 @@ go_test() { local red="" local reset="" - echo "🧪 Test" + echo "🧪 ${S}Test" set +e go test -v ./pkg/... >$test_output 2>&1 local err=$? @@ -102,7 +107,7 @@ go_test() { } check_license() { - echo "⚖️ License" + echo "⚖️ ${S}License" local required_keywords=("Authors" "Apache License" "LICENSE-2.0") local extensions_to_check=("sh" "go" "yaml" "yml" "json") @@ -129,7 +134,7 @@ check_license() { update_deps() { - echo "🕸️ Update" + echo "🕸️ Update" go mod vendor } From 6d671c338f1b7e52b84b9c4f4cf647f5e12c32e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Tue, 25 Jun 2019 07:22:45 +0200 Subject: [PATCH 2/2] fix(build.sh): Avoid uninitialized variable ITERM_PROFILE --- hack/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/build.sh b/hack/build.sh index 44daa6a3d0..974d61a6c9 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -27,7 +27,7 @@ set -eu # Temporary fix for iTerm issue https://gitlab.com/gnachman/iterm2/issues/7901 S="" -if [ -n "$ITERM_PROFILE" ]; then +if [ -n "${ITERM_PROFILE:-}" ]; then S=" " fi # Run build