Skip to content
Snippets Groups Projects
Commit 76ec04cc authored by Erick Hitter's avatar Erick Hitter
Browse files

Add common Makefile

parent bf488f3d
No related branches found
No related tags found
1 merge request!1Add common Makefile
PKG := "${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/$(CI_PROJECT_NAME)"
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
.PHONY: all dep build clean test coverage coverhtml lint
all: build
lint:
@golint -set_exit_status ${PKG_LIST}
test:
@go test -v ${PKG_LIST}
race: dep
@go test -v -race ${PKG_LIST}
msan: dep
@go test -v -msan ${PKG_LIST}
coverage:
./tools/coverage.sh;
coverhtml:
./tools/coverage.sh html;
dep:
@go get -v ./...
build: dep
@gox -output="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}/{{.Dir}}_{{.OS}}_{{.Arch}}" -parallel=6 -osarch '!darwin/386'
clean:
@rm -rf "${CI_PROJECT_DIR}/${CI_PROJECT_NAME}"
help:
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment