-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 797 Bytes
/
Makefile
File metadata and controls
46 lines (38 loc) · 797 Bytes
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
NAME := verify
PKG := github.com/pomerium/$(NAME)
PREFIX?=$(shell pwd)
BUILDDIR := ${PREFIX}/dist
BINDIR := ${PREFIX}/bin
.PHONY: all
all: build lint test
# Build binary artifact
.PHONY: build
build: build-ui build-verify
# Build verify executable
.PHONY: build-verify
build-verify:
@echo "==> $@"
go build -o ${BINDIR}/${NAME} cmd/verify/*.go
# Build frontend javascript
.PHONY: build-ui
build-ui: npm-install
@echo "==> $@"
cd ui; npm run build
# Initial yarn install
.PHONY: npm-install
npm-install:
@echo "==> $@"
cd ui; npm ci
# Run go tests
.PHONY: test
test:
@echo "==> $@"
go test -v ./...
.PHONY: cover
cover: ## Runs go test with coverage
@echo "==> $@"
@go test -race -coverprofile=coverage.txt ./...
.PHONY: lint
lint:
@echo "@==> $@"
golangci-lint run --fix ./...