Skip to content

Commit

Permalink
feat:add default build param GOOS GOARCH
Browse files Browse the repository at this point in the history
Change-Id: I518b41e71e22b699db3c34c378c79a8237ca6fb0
  • Loading branch information
wenmanxiang committed Mar 12, 2023
1 parent 5d5804e commit 94a12cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GOPROXY=${GOPROXY:-`go env GOPROXY`}
GOTAGS=${GOTAGS:-}
GOGCFLAGS=${GOGCFLAGS:-}

GOOS=${GOOS:-linux}
GOARCH=${GOARCH:-amd64}

# enable bash debug output
DEBUG=${DEBUG:-}

Expand All @@ -27,6 +30,7 @@ fi
docker-build() {
name=$1
docker build \
--platform ${GOOS}/${GOARCH} \
--build-arg CGO_ENABLED="${CGO_ENABLED}" \
--build-arg GOPROXY="${GOPROXY}" \
--build-arg GOTAGS="${GOTAGS}" \
Expand Down

0 comments on commit 94a12cc

Please sign in to comment.