fix: Enforce custom LDFLAGS within makefile and add coverage command.
This commit is contained in:
7
Makefile
7
Makefile
@@ -11,7 +11,7 @@ ARCHS ?= amd64 386
|
||||
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
|
||||
SOURCES ?= $(shell find . -name "*.go" -type f)
|
||||
TAGS ?=
|
||||
LDFLAGS += -X 'main.Version=$(VERSION)'
|
||||
LDFLAGS ?= -X 'main.Version=$(VERSION)'
|
||||
|
||||
ifneq ($(shell uname), Darwin)
|
||||
EXTLDFLAGS = -extldflags "-static" $(null)
|
||||
@@ -127,6 +127,11 @@ endif
|
||||
docker tag $(DEPLOY_ACCOUNT)/$(EXECUTABLE):latest $(DEPLOY_ACCOUNT)/$(EXECUTABLE):$(tag)
|
||||
docker push $(DEPLOY_ACCOUNT)/$(EXECUTABLE):$(tag)
|
||||
|
||||
coverage:
|
||||
curl -s https://codecov.io/bash > .codecov && \
|
||||
chmod +x .codecov && \
|
||||
./.codecov -f .cover/coverage.txt
|
||||
|
||||
clean:
|
||||
go clean -x -i ./...
|
||||
find . -name coverage.txt -delete
|
||||
|
||||
Reference in New Issue
Block a user