* static compile so i don't have to docker

pull/4/head
Dominique Liberda 2024-03-13 13:33:33 +01:00
parent 1572a9d37b
commit 8b012a2bbc
1 changed files with 2 additions and 2 deletions

View File

@ -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.