-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
76 lines (59 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
BUILD_PATH = github.com/ouzi-dev/avro-kedavro
HAS_GOLANCI_LINT := $(shell command -v golangci-lint;)
GOLANGCI_LINT_VERSION := v1.21.0
SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
.PHONY: tidy
tidy:
@echo "tidy target..."
@go mod tidy
.PHONY: vendor
vendor: tidy
@echo "vendor target..."
@go mod vendor
.PHONY: build
build: fmt
@echo "build target..."
@go build ./...
.PHONY: test
test: fmt
@echo "test target..."
@go test ./... -v -count=1
.PHONY: lint
lint: bootstrap
@echo "lint target..."
@golangci-lint run --enable-all --disable lll,godox,wsl,funlen ./...
.PHONY: bootstrap
bootstrap:
@echo "bootstrap target..."
ifndef HAS_GOLANCI_LINT
@GOPROXY=direct GOSUMDB=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
endif
.PHONY: fmt
fmt:
@echo "fmt target..."
@gofmt -l -w -s $(SRC)
.PHONE: covhtml
covhtml: test
@scripts/coverage.sh
@go tool cover -html=.cover/cover.out
.PHONY: test-checker-cli
test-checker-cli:
$(MAKE) -C cli test
.PHONY: package-checker-cli
package-checker-cli:
$(MAKE) -C cli clean dist VERSION=$(VERSION)
.PHONY: semantic-release
semantic-release:
npm ci
npx semantic-release
.PHONY: semantic-release-dry-run
semantic-release-dry-run:
npm ci
npx semantic-release -d
.PHONY: install-npm-check-updates
install-npm-check-updates:
npm install npm-check-updates
.PHONY: update-npm-dependencies
update-npm-dependencies: install-npm-check-updates
ncu -u
npm install