This repository was archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (50 loc) · 1.48 KB
/
Copy pathMakefile
File metadata and controls
62 lines (50 loc) · 1.48 KB
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
GOOS ?= linux
GOARCH ?= amd64
PROJECT_DIR ?= $(shell pwd)
modC:
@docker volume create golang-mod-cache
.PHONY: modC
install:
@echo "+$@"
@go install ./cmd/jwac/
.PHONY: install
build-jwac:
@echo "+ $@ ${GOOS}"
@CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o bin/jwac/${GOOS}-${GOARCH}/jwac ./cmd/jwac/
.PHONY: build-jwac
build-jwac-all-platform:
@GOOS=darwin make build-jwac
@GOOS=linux make build-jwac
.PHONY: build-jwac-all-platform
arch-all:
@zip -r arch/bin.zip bin/
.PHONY: arch-jwac-all-platform
build-jwac-tray:
@echo "+ $@ ${GOOS}"
@go build -o bin/jwac-tray/${GOOS}-${GOARCH}/jwac-tray ./cmd/jwac-tray/
.PHONY: build-jwac-tray
build-all: build-jwac-all-platform
@GOOS=darwin make build-jwac-tray
.PHONY: build-jwac-tray
lint: lint-check
@echo "+ $@"
golangci-lint run --enable-all --skip-dirs vendor,version,gen ./pkg/filedb
.PHONY: lint
lint-check:
@echo "+ $@"
@if [ "`golangci-lint --version`" != "golangci-lint has version 1.33.0 built from b90551c on 2020-11-23T06:55:18Z" ]; then \
echo "Not expected version of golangci-lint, expected 1.33.0"; \
exit 1; \
fi
.PHONY: lint-check
mockgen: mockgen-check
@echo "+ $@"
mockgen -source=pkg/filedb/json.go -destination=pkg/filedb/json_mock_test.go -package=filedb
.PHONY: lint
mockgen-check:
@echo "+ $@"
@if [ "`mockgen -version`" != "v1.4.4" ]; then \
echo "Not expected version of mokcgen, expected v1.4.4"; \
exit 1; \
fi
.PHONY: mockgen-check