This repository was archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (62 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
76 lines (62 loc) · 1.4 KB
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
ifeq ($(OS),Windows_NT)
CMDQUIET = >nul 2>nul || (exit 0)
RMDIR = rmdir /Q /S
FixPath = $(subst /,\,$1)
else
CMDQUIET := >/dev/null 2>&1
RMDIR = rm -rf
FixPath = $1
endif
.PHONY: configure-git-hooks
configure-git-hooks:
git config core.hooksPath .githooks
.PHONY: install-js-deps
install-js-deps:
cd injected && \
yarn
.PHONY: clean
clean:
$(RMDIR) $(call FixPath, .build) $(CMDQUIET)
$(RMDIR) $(call FixPath, .dist) $(CMDQUIET)
$(RMDIR) $(call FixPath, rpc/inject/scripts) $(CMDQUIET)
.PHONY: run
run: clean
go build -tags=dev -o crankshaft ./cmd/crankshaft/
./crankshaft -no-cache $(ARGS)
.PHONY: test
test:
go test -tags=dev ./...
.PHONY: serve-docs
serve-docs:
godoc -http=:8878
.PHONY: check-types
check-types:
cd injected && \
yarn tsc
.PHONY: format
format: format-go format-js
.PHONY: format-go
format-go:
goimports -w .
.PHONY: format-js
format-js:
cd injected && \
yarn prettier src --write
.PHONY: bundle-scripts
bundle-scripts:
go run cmd/bundle-scripts/main.go
.PHONY: build
build: bundle-scripts
mkdir rpc/inject/scripts
cp .build/* rpc/inject/scripts
go run cmd/bundle-scripts/main.go
go build -o crankshaft cmd/crankshaft/*.go
.PHONY: flatpak
flatpak: bundle-scripts
mkdir rpc/inject/scripts
cp .build/* rpc/inject/scripts
go run cmd/bundle-scripts/main.go
go build -tags=flatpak -o crankshaft cmd/crankshaft/*.go
.PHONY: api-extractor
api-extractor:
./scripts/api-extractor