This repository has been archived by the owner on May 28, 2024. It is now read-only.
generated from findy-network/findy-template-go
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
81 lines (55 loc) · 1.53 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
77
78
79
80
81
COMM_BRANCH=$(shell ./scripts/branch.sh ../findy-common-go/)
SCAN_SCRIPT_URL="https://raw.githubusercontent.com/findy-network/setup-go-action/master/scanner/cp_scan.sh"
auth:
go build -o $(GOPATH)/bin/auth
cli: auth
scan:
@curl -s $(SCAN_SCRIPT_URL) | bash
scan_and_report:
@curl -s $(SCAN_SCRIPT_URL) | bash -s v > licenses.txt
drop_comm:
go mod edit -dropreplace github.com/findy-network/findy-common-go
drop_all: drop_comm
repl_comm:
go mod edit -replace github.com/findy-network/findy-common-go=../findy-common-go
repl_all: repl_comm
modules: modules_comm
modules_comm: drop_comm
@echo Syncing modules: findy-common-go/$(COMM_BRANCH)
go get github.com/findy-network/findy-common-go@$(COMM_BRANCH)
build:
go build ./...
vet:
go vet ./...
shadow:
@echo Running govet
go vet -vettool=$(GOPATH)/bin/shadow ./...
@echo Govet success
check_fmt:
$(eval GOFILES = $(shell find . -name '*.go'))
@gofmt -l $(GOFILES)
lint:
@golangci-lint run
lint_e:
@$(GOPATH)/bin/golint ./... | grep -v export | cat
test:
go test -v -p 1 -failfast ./...
logged_test:
go test -v -p 1 -failfast ./... -args -logtostderr=true -v=10
test_cov_out:
go test \
-coverpkg=github.com/findy-network/findy-agent-auth/... \
-coverprofile=coverage.txt \
-covermode=atomic \
./...
test_cov: test_cov_out
go tool cover -html=coverage.txt
check: check_fmt vet shadow
dclean:
-docker rmi findy-agent-auth
dbuild:
docker build -t findy-agent-auth .
drun:
docker run -it --rm -p 8888:8888 findy-agent-auth
release:
gh workflow run do-release.yml