-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
66 lines (48 loc) · 1.43 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
build: build0 index.js
CGO_ENABLED=0 go build
build0:
CGO_ENABLED=0 go build
CGO_ENABLED=0 go vet
CGO_ENABLED=0 go run vendor/github.com/mjl-/sherpadoc/cmd/sherpadoc/*.go -adjust-function-names none API >api.json
./gents.sh api.json api.ts
race: build0
go build -race
test:
CGO_ENABLED=0 go test -shuffle=on -coverprofile cover.out
go tool cover -html=cover.out -o cover.html
test-race:
CGO_ENABLED=1 go test -shuffle=on -race -coverprofile cover.out
go tool cover -html=cover.out -o cover.html
run: build
./gopherwatch serve
run-mox: build
./gopherwatch serve -config gopherwatch-mox.conf
run-resettree: build
./gopherwatch serve -resettree
run-resettree-mox: build
./gopherwatch serve -resettree -config gopherwatch-mox.conf
mox:
mox localserve -dir local/mox
genconf: build
./gopherwatch genconf >new.conf
check:
GOARCH=386 CGO_ENABLED=0 go vet
CGO_ENABLED=0 staticcheck
check-shadow:
go vet -vettool=$$(which shadow) ./... 2>&1 | grep -v '"err"'
index.js: api.ts lib.ts index.ts node_modules/.bin/tsc
./tsc.sh index.js api.ts lib.ts index.ts
tswatch:
bash -c 'while true; do inotifywait -q -e close_write *.ts; make index.js; done'
node_modules/.bin/tsc:
-mkdir -p node_modules/.bin
npm ci --ignore-scripts
installjs:
-mkdir -p node_modules/.bin
npm ci --ignore-scripts
installjs0:
-mkdir -p node_modules/.bin
npm install --ignore-scripts --save-dev --save-exact typescript@5.1.6
fmt:
go fmt ./...
gofmt -w -s *.go