Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (52 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
70 lines (52 loc) · 1.5 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
61
62
63
64
65
66
67
68
69
70
.PHONY: build test lint run seed init doctor reconcile-stars payment-review quickstart preflight docker-build docker-up docker-down dev setup coverage
PROVIDER ?= stars
build:
go build ./...
test:
go test ./...
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
lint:
go vet ./...
run:
go run ./cmd/bot run
seed:
go run ./cmd/seed
preflight:
go run ./cmd/preflight
init:
go run ./cmd/bot init
doctor:
go run ./cmd/bot doctor
reconcile-stars:
go run ./cmd/bot reconcile-stars $(ARGS)
payment-review:
go run ./cmd/bot payment-review list --provider=$(PROVIDER)
## quickstart: ask two questions, verify the setup, then start the shop
quickstart:
go run ./cmd/bot quickstart
## setup: legacy non-interactive bootstrap; use `make init` for the guided setup
setup:
@if [ ! -f .env ]; then \
cp .env.example .env; \
echo "✅ Created .env from .env.example — fill in BOT_TOKEN and ADMIN_IDS before running"; \
else \
echo "ℹ️ .env already exists, skipping"; \
fi
@mkdir -p data backups
@echo "✅ Directories ready (data/, backups/)"
@echo ""
@echo "Next steps:"
@echo " 1. Edit .env and set BOT_TOKEN, ADMIN_IDS"
@echo " 2. make doctor (online readiness check)"
@echo " 3. make run (local)"
## dev: start development environment with hot-reload (requires Docker)
dev:
docker compose -f docker-compose.dev.yml up --build
docker-build:
docker build -t shop_bot .
docker-up:
docker compose up --build -d
docker-down:
docker compose down