-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.37 KB
/
Makefile
File metadata and controls
60 lines (46 loc) · 1.37 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
APP_NAME = rsk-event-listener
BIN_DIR = bin
SRC = cmd/listener/main.go
CONFIG = config/production.yaml
.PHONY: all build run test lint docker docker-run clean fmt
all: build
build:
go build -o $(BIN_DIR)/$(APP_NAME) $(SRC)
run: build
./$(BIN_DIR)/$(APP_NAME) --config $(CONFIG)
test:
go test ./...
lint:
golangci-lint run
fmt:
go fmt ./...
docker:
docker build -t $(APP_NAME):latest .
docker-run: docker
docker-compose up --build
clean:
rm -rf $(BIN_DIR)/*
rm -rf data/*.db data/*.db-shm data/*.db-wal
docker-compose down -v
integration-setup:
bash integration_setup.sh
create-production-config:
bash create_production_yaml.sh
logs:
tail -f logs/*.log
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " build Build the Go binary"
@echo " run Run the application"
@echo " test Run all tests"
@echo " lint Run golangci-lint"
@echo " fmt Format Go code"
@echo " docker Build Docker image"
@echo " docker-run Build and run with docker-compose"
@echo " clean Remove binaries and databases"
@echo " integration-setup Run integration setup script"
@echo " create-production-config Generate production config"
@echo " logs Tail application logs"
@echo " help Show this help message"