Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ VERSIONFLAGS="

-X ${PKG_CNI_PLUGINS}/pkg/utils/buildversion.BuildVersion=${VERSION_CNIPLUGINS}
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Program=flannel
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Version=${VERSION_FLANNEL}
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Version=${VERSION_FLANNEL_PLUGIN}
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.Commit=HEAD
-X ${PKG_CNI_PLUGINS}/plugins/meta/flannel.buildDate=${buildDate}

Expand Down Expand Up @@ -149,8 +149,11 @@ if [ ! -x ${INSTALLBIN}/cni${BINARY_POSTFIX} ]; then
TMPDIR=$(mktemp -d)
trap cleanup EXIT
WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
git clone --single-branch --depth=1 --branch=$VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
cd $WORKDIR
rm -rf plugins/meta/flannel
git clone --single-branch --depth=1 --branch=$VERSION_FLANNEL_PLUGIN https://github.com/flannel-io/cni-plugin.git plugins/meta/flannel
sed -i 's/package main/package flannel/; s/func main/func Main/' plugins/meta/flannel/*.go
GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni${BINARY_POSTFIX}
)
fi
Expand Down
1 change: 1 addition & 0 deletions scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if [ -z "$VERSION_CRI_DOCKERD" ]; then
fi

VERSION_CNIPLUGINS="v1.4.0-k3s2"
VERSION_FLANNEL_PLUGIN="v1.4.0-flannel1"

VERSION_KUBE_ROUTER=$(get-module-version github.com/cloudnativelabs/kube-router/v2)
if [ -z "$VERSION_KUBE_ROUTER" ]; then
Expand Down