forked from github/multus-cni
RE: #1725832 - openssl support, dynamically link glibc
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
d3a1815632
commit
ca50f32648
6
build
6
build
@ -20,7 +20,7 @@ set -e
|
|||||||
DATE=$(date --iso-8601=seconds)
|
DATE=$(date --iso-8601=seconds)
|
||||||
COMMIT=$(git rev-parse --verify HEAD)
|
COMMIT=$(git rev-parse --verify HEAD)
|
||||||
LDFLAGS="-X main.version=${VERSION:-master} -X main.commit=${COMMIT} -X main.date=${DATE}"
|
LDFLAGS="-X main.version=${VERSION:-master} -X main.commit=${COMMIT} -X main.date=${DATE}"
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=1
|
||||||
|
|
||||||
# this if... will be removed when gomodules goes default
|
# this if... will be removed when gomodules goes default
|
||||||
if [ "$GO111MODULE" == "off" ]; then
|
if [ "$GO111MODULE" == "off" ]; then
|
||||||
@ -38,11 +38,11 @@ if [ "$GO111MODULE" == "off" ]; then
|
|||||||
export GO15VENDOREXPERIMENT=1
|
export GO15VENDOREXPERIMENT=1
|
||||||
export GOBIN=${PWD}/bin
|
export GOBIN=${PWD}/bin
|
||||||
export GOPATH=${PWD}/gopath
|
export GOPATH=${PWD}/gopath
|
||||||
go install -tags no_openssl -ldflags "${LDFLAGS}" "$@" ${REPO_PATH}/multus
|
go install -ldflags "${LDFLAGS}" "$@" ${REPO_PATH}/multus
|
||||||
else
|
else
|
||||||
# build with go modules
|
# build with go modules
|
||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
|
|
||||||
echo "Building plugins"
|
echo "Building plugins"
|
||||||
go build -o ${DEST_DIR}/multus -tags no_openssl -ldflags "${LDFLAGS}" "$@" ./multus
|
go build -o ${DEST_DIR}/multus -ldflags "${LDFLAGS}" "$@" ./multus
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user