-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
47 lines (33 loc) · 1 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
# Needs to be defined before including Makefile.common to auto-generate targets
DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le s390x
UI_PATH = web/ui
GOLANGCI_LINT_OPTS ?= --timeout 4m
include Makefile.common
DOCKER_IMAGE_NAME ?= argus
.PHONY: go-build
go-build: commit-prereqs common-build
.PHONY: go-test
go-test:
go test --tagsunit,integration ./...
.PHONY: go-test-coverage
go-test-coverage:
go test ./... -coverpkg=./... -coverprofile ./coverage.out --tags unit,integration
go tool cover -func ./coverage.out
.PHONY: web-install
web-install:
cd $(UI_PATH) && { npx --yes update-browserslist-db@latest || true; } && npm install
.PHONY: web-build
web-build:
cd $(UI_PATH) && npm run build
.PHONY: web-test
web-test:
cd $(UI_PATH) && npm run test:coverage
.PHONY: web-lint
web-lint:
cd $(UI_PATH) && npm run lint
.PHONY: web
web: web-install web-build
.PHONY: build
build: web common-build
.PHONY: build-all
build-all: web-build compress-web build-darwin build-freebsd build-linux build-openbsd build-windows