diff --git a/.goreleaser.yml b/.goreleaser.yml index 088d2ab..3681856 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,6 +6,10 @@ builds: env: # needed for sqlite support - CGO_ENABLED=1 + ldflags: + - "-extldflags=-static" + tags: + - sqlite_omit_load_extension goos: - linux # not able to build for these plattforms, as sqlite needs cgo diff --git a/Makefile b/Makefile index d592d63..5c1da2b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ BINARY_NAME=upstream-watch all: build build: - $(GOBUILD) -o $(BINARY_NAME) cmd/main.go + $(GOBUILD) -ldflags="-extldflags=-static" -tags sqlite_omit_load_extension -o $(BINARY_NAME) cmd/main.go test: $(GOTEST) ./... clean: @@ -17,7 +17,7 @@ clean: run: build ./$(BINARY_NAME) localtest: build - cp $(BINARY_NAME) ../../upstream-watch-test-repo/ + cp $(BINARY_NAME) ../../upstream-watch-test-repo testcoverage: $(GOTEST) -coverprofile coverage.out ./... && go tool cover -html=coverage.out && rm coverage.out lint: