-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
45 lines (35 loc) · 1.15 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
PKG=./
cap-version:
wget -O /tmp/gotify.go.mod https://github.com/gotify/server/raw/master/go.mod; \
for P in ${PKG}; do \
go run github.com/gotify/plugin-api/cmd/gomod-cap -to `echo $$P` -from /tmp/gotify.go.mod; \
done
check: check-go check-symbol check-mod check-lint
check-go:
for P in ${PKG}; do \
go test `echo $$P`; \
done
check-lint:
for P in ${PKG}; do \
golint -set_exit_status `echo $$P`; \
done
check-mod:
wget -O /tmp/gotify.go.mod https://github.com/gotify/server/raw/master/go.mod; \
for P in ${PKG}; do \
go run github.com/gotify/plugin-api/cmd/gomod-cap -to `echo $$P` -from /tmp/gotify.go.mod -check=true; \
done
check-symbol:
for P in ${PKG}; do \
go-exports -d `echo $$P` -c `echo $$P/export_ref_do_not_edit.json`; \
done
release: generate-symbol
generate-symbol:
for P in ${PKG}; do \
if [ ! -f `echo $$P/export_ref_do_not_edit.json` ]; then \
go-exports -d `echo $$P` > `echo $$P/export_ref_do_not_edit.json`; \
fi; \
done
download-tools:
go get -u golang.org/x/lint/golint
go get -u github.com/eternal-flame-AD/go-exports
.PHONY: check-go check-symbol check-lint check-mod generate-symbol cap-version download-tools