forked from funfinance/fin-bot-miniapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (38 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
50 lines (38 loc) · 1.13 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
.PHONY: build run clean test install setup help
BINARY_NAME=finbot
build:
@echo "Building..."
@go build -o $(BINARY_NAME) cmd/bot/main.go
@echo "Build complete: $(BINARY_NAME)"
run: build
@./$(BINARY_NAME)
run-config: build
@./$(BINARY_NAME) -config $(CONFIG)
install:
@go mod download
@go mod tidy
test:
@go test -v ./...
test-coverage:
@go test -cover ./...
@go test -coverprofile=coverage.out ./...
@go tool cover -html=coverage.out -o coverage.html
clean:
@rm -f $(BINARY_NAME) coverage.out coverage.html
fmt:
@go fmt ./...
lint:
@golangci-lint run
setup:
@mkdir -p data logs
help:
@echo " make setup - Create data/ and logs/ directories"
@echo " make build - Build the binary"
@echo " make run - Build and run"
@echo " make run-config - Run with custom config (CONFIG=/path/to/config.yaml)"
@echo " make install - Install dependencies"
@echo " make test - Run tests"
@echo " make test-coverage - Run tests with coverage"
@echo " make fmt - Format code"
@echo " make lint - Lint code"
@echo " make clean - Remove build artifacts"