-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
45 lines (34 loc) · 943 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
GO ?= go
OUTFILE ?= idealogue
clean:
rm -f ./services/coverage.out
rm -f ./routes/coverage.out
rm -f ./coverage.out
rm -f $(OUTFILE)
build: clean
$(GO) build -v ./services/*.go
$(GO) build -v ./routes/*.go
$(GO) build -v -o $(OUTFILE) ./*.go
clean-ui:
find ./client/src/app -name "*.js" -delete
find ./client/src/app -name "*.js.map" -delete
build-ui: clean-ui
cd client; tsc
watch-ui: clean-ui
cd client; tsc -w
install: build
$(GO) install ./...
run: build
./$(OUTFILE)
test: install
$(GO) test -cover -short ./...
test-verbose: install
$(GO) test -cover -short -v ./...
cover: install
$(GO) test -coverprofile=services/coverage.out -short ./services
$(GO) test -coverprofile=routes/coverage.out -short ./routes
$(GO) test -coverprofile=coverage.out -short .
cover-report: cover
$(GO) tool cover -html=./services/coverage.out
$(GO) tool cover -html=./routes/coverage.out
$(GO) tool cover -html=./coverage.out