mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Don't build cni on each ./scripts/build invocation
This commit is contained in:
parent
c3cb09cbdc
commit
dca6a22f3f
|
@ -48,7 +48,6 @@ rm -f \
|
||||||
bin/k3s-agent \
|
bin/k3s-agent \
|
||||||
bin/hyperkube \
|
bin/hyperkube \
|
||||||
bin/containerd \
|
bin/containerd \
|
||||||
bin/cni \
|
|
||||||
bin/runc \
|
bin/runc \
|
||||||
bin/containerd-shim \
|
bin/containerd-shim \
|
||||||
bin/containerd-shim-runc-v1 \
|
bin/containerd-shim-runc-v1 \
|
||||||
|
@ -65,6 +64,7 @@ cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTALLBIN=$(pwd)/bin
|
INSTALLBIN=$(pwd)/bin
|
||||||
|
if [ ! -x ${INSTALLBIN}/cni ]; then
|
||||||
(
|
(
|
||||||
echo Building cni
|
echo Building cni
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
|
@ -74,6 +74,7 @@ INSTALLBIN=$(pwd)/bin
|
||||||
cd $WORKDIR
|
cd $WORKDIR
|
||||||
GOPATH=$TMPDIR CGO_ENABLED=0 go build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o $INSTALLBIN/cni
|
GOPATH=$TMPDIR CGO_ENABLED=0 go build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o $INSTALLBIN/cni
|
||||||
)
|
)
|
||||||
|
fi
|
||||||
# echo Building agent
|
# echo Building agent
|
||||||
# CGO_ENABLED=1 go build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s-agent ./cmd/agent/main.go
|
# CGO_ENABLED=1 go build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s-agent ./cmd/agent/main.go
|
||||||
echo Building server
|
echo Building server
|
||||||
|
|
Loading…
Reference in New Issue
Block a user