-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 963 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
43
44
45
46
47
48
49
50
# Build all by default, even if it's not first
.DEFAULT_GOAL := all
.PHONY: all
all: build
ROOT_PACKAGE=github.com/JieTrancender/nsq-tool-kit
VERSION_PACKAGE=github.com/marmotedu/component-base/pkg/version
include scripts/make-rules/common.mk
include scripts/make-rules/golang.mk
### build: Show Makefile rules
.PHONY: build
build:
@$(MAKE) go.build
APPS = nsq-tool-kit
$(BUILDDIR)/%:
@mkdir -p $(dir $@)
go build ${BUILDFLAGS} -o $@ ./
$(APPS): %: $(BUILDDIR)/%
### help: Show Makefile rules
.PHONY: help
help:
@echo Makefile rules:
@echo
@grep -E '^### [-A-Za-z0-9_]+:' Makefile | sed 's/###/ /'
### test: Exec go test
.PHONY: test
test:
@$(MAKE) go.test
### lint: Exec lint
.PHONY: lint
lint:
golangci-lint cache clean
golangci-lint run --tests=false ./...
### clean: Clean up generated files
clean:
rm -rf $(BUILDDIR)
### tidy: Exec go mod tidy
tidy:
go mod tidy