-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (34 loc) · 925 Bytes
/
Makefile
File metadata and controls
49 lines (34 loc) · 925 Bytes
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
.PHONY: build test lint run clean proto fmt vet dashboard install uninstall
BINARY := peerclawd
BUILD_DIR := bin
GO := go
GOFLAGS := -v
dashboard:
cd web/app && npm install && npm run build
build: dashboard
CGO_ENABLED=1 $(GO) build $(GOFLAGS) -o $(BUILD_DIR)/$(BINARY) ./cmd/peerclawd
run: build
./$(BUILD_DIR)/$(BINARY) -config configs/peerclaw.example.yaml
test:
CGO_ENABLED=1 $(GO) test $(GOFLAGS) ./...
test-cover:
CGO_ENABLED=1 $(GO) test -coverprofile=coverage.out ./...
$(GO) tool cover -html=coverage.out -o coverage.html
lint:
golangci-lint run ./...
fmt:
$(GO) fmt ./...
vet:
$(GO) vet ./...
clean:
rm -rf $(BUILD_DIR) coverage.out coverage.html *.db
install: build
sudo deploy/systemd/install.sh $(BUILD_DIR)/$(BINARY)
uninstall:
sudo deploy/systemd/uninstall.sh
docker-build:
docker build -t peerclaw-server:latest .
docker-up:
docker-compose up -d
docker-down:
docker-compose down