-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (41 loc) · 948 Bytes
/
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
# SPDX-FileCopyrightText: 2023 Risk.Ident GmbH <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
.PHONY: build
build: ri-forward-webhook
ri-forward-webhook: *.go
go build
.PHONY: clean
clean:
rm -f ri-forward-webhook
.PHONY: deps
deps: deps-npm deps-go
.PHONY: deps-go
deps-go:
go mod download
go install golang.org/x/tools/cmd/goimports@latest
.PHONY: deps-npm
deps-npm: node_modules
node_modules: package.json
npm install
.PHONY: lint
lint: lint-md lint-go lint-license
.PHONY: lint-fix
lint-fix: lint-md-fix lint-go-fix
.PHONY: lint-md
lint-md: node_modules
npx markdownlint-cli2
.PHONY: lint-md-fix
lint-md-fix: node_modules
npx markdownlint-cli2 --fix
.PHONY: lint-go
lint-go:
@echo goimports -d '**/*.go'
@goimports -d $(shell git ls-files "*.go")
.PHONY: lint-go-fix
lint-go-fix:
@echo goimports -d -w '**/*.go'
@goimports -d -w $(shell git ls-files "*.go")
.PHONY: lint-license
lint-license:
reuse lint