-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
33 lines (26 loc) · 925 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
GO_SOURCES=$(shell find . -type f -name '*.go' -not -path "./vendor/*")
.PHONY: build
build:
export PUBLIC_BACKEND_ENDPOINT="" && \
export PUBLIC_BACKEND_WS_ENDPOINT="" && \
cd pkg/web && npm install && npm run build
go build -o bin/quickpizza ./cmd
# Note: does not include frontend files, only Go code.
.PHONY: build-mock
build-mock:
go build -tags=mock -o bin/quickpizza ./cmd
.PHONY: proto
proto:
protoc --go_out=. --go-grpc_out=. proto/quickpizza.proto
.PHONY: format
format:
@goimports -w -l $(GO_SOURCES)
.PHONY: format-check
format-check:
@out=$$(goimports -l $(GO_SOURCES)) && echo "$$out" && test -z "$$out"
.PHONY: docker-localdev-build
docker-localdev-build:
docker build . -t grafana/quickpizza:localdev
.PHONY: docker-localdev-run
docker-localdev-run:
docker run --rm -it -p 3333:3333 -p 3334:3334 -p 3335:3335 -v $$(pwd):/db -e QUICKPIZZA_DB=file:/db/quickpizza.db grafana/quickpizza:localdev