fix(build.sh): Cosmetic spacing fix (#199)

* 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.

* fix(build.sh): Avoid uninitialized variable ITERM_PROFILE
This commit is contained in:
Roland Huß 2019-06-25 20:13:05 +02:00 committed by Knative Prow Robot
parent d556df17ac
commit a0eb6118cd
1 changed files with 9 additions and 4 deletions

View File

@ -25,6 +25,11 @@ fi
set -eu 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 build
run() { run() {
# Switch on modules unconditionally # Switch on modules unconditionally
@ -73,7 +78,7 @@ run() {
} }
go_fmt() { go_fmt() {
echo "🧹 Format" echo "🧹 ${S}Format"
go fmt ./cmd/... ./pkg/... go fmt ./cmd/... ./pkg/...
} }
@ -88,7 +93,7 @@ go_test() {
local red="" local red=""
local reset="" local reset=""
echo "🧪 Test" echo "🧪 ${S}Test"
set +e set +e
go test -v ./pkg/... >$test_output 2>&1 go test -v ./pkg/... >$test_output 2>&1
local err=$? local err=$?
@ -102,7 +107,7 @@ go_test() {
} }
check_license() { check_license() {
echo "⚖️ License" echo "⚖️ ${S}License"
local required_keywords=("Authors" "Apache License" "LICENSE-2.0") local required_keywords=("Authors" "Apache License" "LICENSE-2.0")
local extensions_to_check=("sh" "go" "yaml" "yml" "json") local extensions_to_check=("sh" "go" "yaml" "yml" "json")