-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
83 lines (61 loc) · 1.99 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
# Only one `gow` per terminal is allowed to use raw mode.
# Otherwise they conflict with each other.
RAW := $(if $(filter $(MAKELEVEL),0),-r,)
GOW_FLAGS := $(RAW)
# Expects an existing stable version of `gow`.
GOW := gow $(GOW_FLAGS)
.PHONY: changes
changes:
echo "Changes since \c"
git tag --merged | sort -V | tail -1
gorelease -base=`git tag --merged | sort -V | tail -1`
.PHONY: main
main: codegen-watch
.PHONY: codegen-clean
codegen-clean:
rm -f scripting/*_generated.go
rm -f scripting/**/*_generated.go
rm -f dom/*_generated.go
rm -f internal/**/*_generated.go
rm -f html/*_generated.go
.PHONY: codegen-watch codegen-run
codegen-run:
make -j2 codegen-watch codegen-build-watch
codegen-watch: codegen-clean
$(GOW) -w ./internal/code-gen -S="Codegen done" -e="" generate ./...
.PHONY: codegen codegen-build codegen-build-watch
codegen-test:
$(MAKE) -C internal/code-gen test
codegen-build:
$(MAKE) -C internal/code-gen build
codegen-build-watch:
$(MAKE) -C internal/code-gen build-watch
codegen: codegen-clean codegen-build
go generate ./...
.PHONY: test test-watch test-browser test-v8 test-goja
test:
go test -v -vet=all ./...
test-watch:
gotestsum --format dots ./... -- vet=off || echo "Error"
gotestsum --format dots --watch ./... -- vet=off
.PHONY: test-browser test-dom
test-dom:
gotestsum --packages "`go list -deps ./dom | ./deps`" --format dots --watch
test-browser:
gotestsum --packages "`go list -deps ./html | ./deps`" --format dots --watch
.PHONY: test-html
test-html:
cd html && ginkgo watch -vet=off
.PHONY: test-v8
test-v8:
gotestsum --format dots --watch --packages "./scripting/v8host ./internal/test/scripttests" -- -vet=off
test-scripting:
gotestsum --format dots --watch --packages "./scripting/... ./internal/test/scripttests" -- -vet=off
.PHONY: test-goja
test-goja:
$(GOW) -c -e=go -e=js -e=html -w ./.. test -vet=off ./scripting/gojahost
.PHONY: ci ci-build
ci-build:
go build -v ./...
ci: codegen ci-build test codegen-test
git diff --quiet HEAD