df36329238
This commit migrates kuryr_cni to use go mod and updates its Dockerfile. Closes-Bug: #1922235 Change-Id: If8b7c0350c0dcfd3de2735aff2efe9c86bbd4e58
10 lines
302 B
Bash
Executable File
10 lines
302 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eu
|
|
cmd=kuryr-cni
|
|
eval $(go env | grep -e "GOHOSTOS" -e "GOHOSTARCH")
|
|
GOOS=${GOOS:-${GOHOSTOS}}
|
|
GOARCH=${GOACH:-${GOHOSTARCH}}
|
|
GOFLAGS=${GOFLAGS:-}
|
|
GLDFLAGS=${GLDFLAGS:-}
|
|
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o bin/${cmd} pkg/*
|