Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ fi

set -eu

# Temporary fix for iTerm issue https://gitlab.com/gnachman/iterm2/issues/7901
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest replacing the 4 lines with

[[ -n "${ITERM_PROFILE:-}" ]] S=" " || S=""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated but kept the if-syntax although a bit more terse but easier to understand for non-shell gurus.

S=""
if [ -n "${ITERM_PROFILE:-}" ]; then
S=" "
fi
# Run build
run() {
# Switch on modules unconditionally
Expand Down Expand Up @@ -73,7 +78,7 @@ run() {
}

go_fmt() {
echo "🧹 Format"
echo "🧹 ${S}Format"
go fmt ./cmd/... ./pkg/...
}

Expand All @@ -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=$?
Expand All @@ -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")

Expand All @@ -129,7 +134,7 @@ check_license() {


update_deps() {
echo "🕸️ Update"
echo "🕸️ Update"
go mod vendor
}

Expand Down