forked from gravitational/teleport-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
85 lines (68 loc) · 1.89 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
82
83
84
85
GO_LINTERS ?= "golint,unused,govet,typecheck,deadcode,goimports,varcheck,structcheck,bodyclose,staticcheck,ineffassign,unconvert,misspell"
.PHONY: access-slack
access-slack:
make -C access/slack
.PHONY: access-jira
access-jira:
make -C access/jira
.PHONY: access-mattermost
access-mattermost:
make -C access/mattermost
.PHONY: access-pagerduty
access-pagerduty:
make -C access/pagerduty
.PHONY: access-gitlab
access-gitlab:
make -C access/gitlab
.PHONY: access-webhooks
access-webhooks:
make -C access/webhooks
.PHONY: access-example
access-example:
go build -o build/access-example ./access/example
# Run all tests
.PHONY: test
test:
go test -race -count 1 ./...
# Individual releases
.PHONY: release/access-slack
release/access-slack:
make -C access/slack clean release
.PHONY: release/access-jira
release/access-jira:
make -C access/jira clean release
.PHONY: release/access-mattermost
release/access-mattermost:
make -C access/mattermost clean release
.PHONY: release/access-pagerduty
release/access-pagerduty:
make -C access/pagerduty clean release
.PHONY: release/access-gitlab
release/access-gitlab:
make -C access/gitlab clean release
.PHONY: release/access-webhooks
release/access-webhooks:
make -C access/webhooks clean release
# Run all releases
.PHONY: releases
releases: release/access-slack release/access-jira release/access-mattermost release/access-pagerduty release/access-gitlab
.PHONY: build-all
build-all: access-slack access-jira access-mattermost access-pagerduty access-gitlab access-webhooks
#
# Lint the Go code.
# By default lint scans the entire repo. Pass FLAGS='--new' to only scan local
# changes (or last commit).
#
.PHONY: lint
lint: FLAGS ?=
lint:
golangci-lint run \
--disable-all \
--exclude-use-default \
--skip-dirs vendor \
--uniq-by-line=false \
--max-same-issues=0 \
--max-issues-per-linter 0 \
--timeout=5m \
--enable $(GO_LINTERS) \
$(FLAGS)