From b2d3d6cef5ccf5a8a328f9e45f533c6784c374c8 Mon Sep 17 00:00:00 2001 From: dlorenc Date: Thu, 12 Oct 2023 19:20:32 -0400 Subject: [PATCH] Switch build target from main.go to a package. (#8342) * Switch build target from main.go to a package. * Dont build with vcs Signed-off-by: Dan Lorenc Signed-off-by: Derek Nola Co-authored-by: Derek Nola (cherry picked from commit 3d25e9f66cc3d254637fb8fab8e8891e94fa6623) Signed-off-by: Brad Davidson --- scripts/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build b/scripts/build index e58318655cc1..556748c72d14 100755 --- a/scripts/build +++ b/scripts/build @@ -126,7 +126,7 @@ if [ ! -x ${INSTALLBIN}/cni ]; then fi echo Building k3s -CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go +CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -buildvcs=false -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server ln -s k3s ./bin/k3s-agent ln -s k3s ./bin/k3s-server ln -s k3s ./bin/k3s-token