mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-20 00:52:58 +00:00
Merge pull request #530 from rktidwell/master
build: Enable -mod build flag to be toggled via environment variable
This commit is contained in:
6
build
6
build
@@ -44,7 +44,11 @@ if [ "$GO111MODULE" == "off" ]; then
|
||||
else
|
||||
# build with go modules
|
||||
export GO111MODULE=on
|
||||
BUILD_ARGS=(-o ${DEST_DIR}/multus -tags no_openssl)
|
||||
if [ -n "$MODMODE" ]; then
|
||||
BUILD_ARGS+=(-mod "$MODMODE")
|
||||
fi
|
||||
|
||||
echo "Building plugins"
|
||||
go build -o ${DEST_DIR}/multus -tags no_openssl -ldflags "${LDFLAGS}" "$@" ./multus
|
||||
go build ${BUILD_ARGS[*]} -ldflags "${LDFLAGS}" "$@" ./multus
|
||||
fi
|
||||
|
Reference in New Issue
Block a user