Skip to content

Commit

Permalink
Go build: In verbose mode, also output commands in gobuild.sh (istio#…
Browse files Browse the repository at this point in the history
…3451)

Automatic merge from submit-queue.

Go build: In verbose mode, also output commands in gobuild.sh

This is useful for debug purposes, in order to see the entire
`go build` command line being executed.
  • Loading branch information
jwendell authored and istio-merge-robot committed Feb 14, 2018
1 parent 6008fb8 commit 17d6d49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ endif
# Output control
#-----------------------------------------------------------------------------
# Invoke make VERBOSE=1 to enable echoing of the command being executed
VERBOSE ?= 0
export VERBOSE ?= 0
# Place the variable Q in front of a command to control echoing of the command being executed.
Q = $(if $(filter 1,$VERBOSE),,@)
# Use the variable H to add a header (equivalent to =>) to informational output
Expand Down
14 changes: 8 additions & 6 deletions bin/gobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
# limitations under the License.
#
# This script builds and link stamps the output

VERBOSE=${VERBOSE:-"0"}
V=""
if [[ "${VERBOSE}" == "1" ]];then
V="-x"
set -x
fi

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

OUT=${1:?"output path"}
Expand All @@ -23,12 +31,6 @@ BUILDPATH=${3:?"path to build"}

set -e

VERBOSE=${VERBOSE:-"0"}
V=""
if [[ "${VERBOSE}" == "1" ]];then
V="-x"
fi

GOOS=${GOOS:-linux}
GOARCH=${GOARCH:-amd64}
GOBINARY=${GOBINARY:-go}
Expand Down

0 comments on commit 17d6d49

Please sign in to comment.