forked from geanlabs/gean
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 1 KB
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 1 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
.PHONY: build test test-race lint fmt clean docker-build run run-devnet help
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
build:
@mkdir -p bin
@echo "Building gean..."
@go build -ldflags "-X main.version=$(VERSION)" -o bin/gean ./cmd/gean
@echo "Done: bin/gean"
test:
go test ./...
test-race:
go test -race ./...
lint:
go vet ./...
@which staticcheck > /dev/null 2>&1 && staticcheck ./... || echo "staticcheck not installed, skipping"
fmt:
go fmt ./...
clean:
rm -rf bin
go clean
docker-build:
docker build -t gean:$(VERSION) .
run: build
./bin/gean --genesis config.yaml --bootnodes nodes.yaml --validator-registry-path validators.yaml --node-id node0
run-devnet:
@if [ ! -d "../lean-quickstart" ]; then \
echo "Cloning lean-quickstart..."; \
git clone https://github.com/blockblaz/lean-quickstart.git ../lean-quickstart; \
fi
$(MAKE) docker-build
cd ../lean-quickstart && NETWORK_DIR=local-devnet ./spin-node.sh --node gean_0 --generateGenesis --metrics