Skip to content

Commit

Permalink
Switch build target from main.go to a package. (k3s-io#8342)
Browse files Browse the repository at this point in the history
* Switch build target from main.go to a package.
* Dont build with vcs

Signed-off-by: Dan Lorenc <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Co-authored-by: Derek Nola <[email protected]>
(cherry picked from commit 3d25e9f)
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
2 people authored and brandond committed Oct 12, 2023
1 parent 268f45b commit 8ecb3e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ecb3e2

Please sign in to comment.