-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (30 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
all: build
.PHONY: lint
lint: .prepare ## Lint the files
@go mod tidy
@golint ./...
@golangci-lint run ./...
.PHONY: fix
fix: .prepare ## Lint and fix vialoations
@go mod tidy
@golangci-lint run --fix ./...
.PHONY: compose
compose: clean .prepare ## Run docker-compose to create the DEV ENV
@docker-compose -f docker-compose.yaml up -d
.PHONY: test
test: .prepare ## Run unittests
@go test --count 1 -v -timeout 30s -short ./...
.PHONY: build
build: lint ## Build the test application
@go build -o httpmq-test-cli.bin .
.prepare: ## Prepare the project for local development
@pip3 install --user pre-commit
@pre-commit install
@pre-commit install-hooks
@GO111MODULE=on go install github.com/go-critic/go-critic/cmd/gocritic@v0.5.4
@touch .prepare
.PHONY: clean
clean: .prepare ## Clean up DEV ENV
@docker-compose -f docker-compose.yaml down --volume
help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'