Skip to content

Commit 7a0a995

Browse files
committed
collapse some log statements from 2 lines into one line
1 parent f235a7b commit 7a0a995

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

build-go-project.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,19 @@ heading2() {
3434
buildstep() {
3535
local fn="$1"
3636

37-
heading1Begin "$fn"
38-
3937
# "staticAnalysis" -> "SKIP_STATICANALYSIS"
4038
local skip_key="SKIP_${fn^^}"
4139

4240
if [ "${!skip_key:-}" == "y" ]; then
43-
echo "Skipping because '$skip_key' set"
44-
heading1End
41+
if [ -n "${DEBUG:-}" ]; then
42+
heading1Begin "$fn (skipped because '$skip_key' set)"
43+
heading1End
44+
fi
4545
return
4646
fi
4747

48+
heading1Begin "$fn"
49+
4850
"$fn"
4951

5052
local afterhook_fn="hook_${fn}_after"
@@ -97,11 +99,12 @@ gobuildmaybe() {
9799

98100
local buildEnvVarContent="${!buildEnvVarName:-}"
99101

100-
heading2 "build $os-$architecture"
101102

102103
if [ ! "$buildEnvVarContent" = "true" ]; then
103-
echo "Skipping because $buildEnvVarName != true"
104+
heading2 "build $os-$architecture (skipping because $buildEnvVarName != true)"
104105
return
106+
else
107+
heading2 "build $os-$architecture"
105108
fi
106109

107110
builds_count=$((builds_count+1))

0 commit comments

Comments
 (0)