diff --git a/Makefile b/Makefile index 22b442b..88e337b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CURL ?= $(shell command -v curl 2> /dev/null) MANIFEST_FILE ?= plugin.json GOPATH ?= $(shell go env GOPATH) GO_TEST_FLAGS ?= -race -GO_BUILD_FLAGS ?= +GO_BUILD_FLAGS ?= --ldflags '-linkmode=external -extldflags=-static' MM_UTILITIES_DIR ?= ../mattermost-utilities export GO111MODULE=on @@ -55,7 +55,7 @@ golangci-lint: server: ifneq ($(HAS_SERVER),) mkdir -p server/dist; - cd server && env GOOS=linux GOARCH=amd64 $(GO) build $(GO_BUILD_FLAGS) -o dist/plugin-linux-amd64; + cd server && env GOOS=linux GOARCH=amd64 CGO_ENABLED=1 $(GO) build $(GO_BUILD_FLAGS) -o dist/plugin-linux-amd64; endif ## Ensures NPM dependencies are installed without having to run this all the time.