fix: Enforce custom LDFLAGS within makefile and add coverage command.
This commit is contained in:
parent
9f87268dc0
commit
cbbbc4eef0
|
@ -24,9 +24,7 @@ pipeline:
|
|||
- make build
|
||||
- coverage all
|
||||
# send coverage report
|
||||
- curl -s https://codecov.io/bash > .codecov &&
|
||||
chmod +x .codecov &&
|
||||
./.codecov -t ${CODECOV_TOKEN} -f .cover/coverage.txt
|
||||
- make coverage
|
||||
# build binary for docker image
|
||||
- make docker_build
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIHBhdGg6IC9nby9zcmMvZ2l0aHViLmNvbS9hcHBsZWJveS9nb3J1c2gKCnBpcGVsaW5lOgogIGNsb25lOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0CiAgICB0YWdzOiB0cnVlCgogICMgcmVzdG9yZSB0aGUgY2FjaGUgZnJvbSBhbiBzZnRwIHNlcnZlcgogIHJlc3RvcmVfY2FjaGU6CiAgICBpbWFnZTogYXBwbGVib3kvZHJvbmUtc2Z0cC1jYWNoZQogICAgcmVzdG9yZTogdHJ1ZQogICAgbW91bnQ6IFsgLmdsaWRlLCB2ZW5kb3IgXQogICAgaWdub3JlX2JyYW5jaDogdHJ1ZQoKICBidWlsZDoKICAgIGltYWdlOiBhcHBsZWJveS9nb2xhbmctdGVzdGluZzoke0dPX1ZFUlNJT059CiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBHT1BBVEg9L2dvCiAgICBjb21tYW5kczoKICAgICAgLSBtYWtlIGRlcF9pbnN0YWxsCiAgICAgIC0gbWFrZSB2ZXQKICAgICAgLSBtYWtlIGxpbnQKICAgICAgLSBtYWtlIGJ1aWxkCiAgICAgIC0gY292ZXJhZ2UgYWxsCiAgICAgICMgc2VuZCBjb3ZlcmFnZSByZXBvcnQKICAgICAgLSBjdXJsIC1zIGh0dHBzOi8vY29kZWNvdi5pby9iYXNoID4gLmNvZGVjb3YgJiYKICAgICAgICBjaG1vZC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ACKAGES ?= $(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
|
||||
|
|
Loading…
Reference in New Issue