-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
42 lines (29 loc) · 839 Bytes
/
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
39
40
41
42
SHELL := /bin/bash
# The name of the executable
TARGET := 'proxysql-agent'
# Use linker flags to provide version/build settings to the target.
LDFLAGS=-ldflags "-s -w"
all: clean lint build
$(TARGET):
@go build $(LDFLAGS) -o $(TARGET) cmd/proxysql-agent/main.go
build: clean $(TARGET)
@true
clean:
@rm -rf $(TARGET) *.test *.out tmp/* coverage dist
lint:
@gofmt -s -l -w .
@go vet ./...
@golangci-lint run --config=.golangci.yml --allow-parallel-runners
test:
@mkdir -p coverage
@go test ./... --shuffle=on --coverprofile coverage/coverage.out
coverage: test
@go tool cover -html=coverage/coverage.out
run: build
@./$(TARGET)
docker: clean lint
@docker build -f build/dev.Dockerfile -t persona-id/proxysql-agent:latest .
snapshot: clean lint
@goreleaser --snapshot --clean
release: clean lint
@goreleaser --clean