-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
39 lines (28 loc) · 946 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
# dora
BUILDTIME := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
VERSION := $(shell git rev-parse --short HEAD)
GOLDFLAGS += -X 'github.com/ethpandaops/dora/utils.BuildVersion="$(VERSION)"'
GOLDFLAGS += -X 'github.com/ethpandaops/dora/utils.Buildtime="$(BUILDTIME)"'
GOLDFLAGS += -X 'github.com/ethpandaops/dora/utils.BuildRelease="$(RELEASE)"'
.PHONY: all test clean
all: test build
test: ensure-ui
$(MAKE) -C ui-package test
go test ./...
build: ensure-ui
@echo version: $(VERSION)
env CGO_ENABLED=1 go build -v -o bin/ -ldflags="-s -w $(GOLDFLAGS)" ./cmd/*
ensure-ui:
if [ ! -f ui-package/dist/react-ui.js ]; then $(MAKE) build-ui; fi
build-ui:
$(MAKE) -C ui-package install
$(MAKE) -C ui-package build
clean:
rm -f bin/*
$(MAKE) -C ui-package clean
devnet:
.hack/devnet/run.sh
devnet-run: devnet ensure-ui
go run cmd/dora-explorer/main.go --config .hack/devnet/generated-dora-config.yaml
devnet-clean:
.hack/devnet/cleanup.sh