-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
87 lines (72 loc) · 1.54 KB
/
Taskfile.yml
File metadata and controls
87 lines (72 loc) · 1.54 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3'
vars:
BINARY_NAME: zee-mirror
EXE: '{{if eq OS "windows"}}.exe{{end}}'
ENTRY_POINT: ./cmd/bot
tasks:
setup:
desc: Setup the bot (login and generate session string)
cmds:
- powershell -ExecutionPolicy Bypass -File ./setup.ps1
build:
desc: Build the binary
cmds:
- go build -o {{.BINARY_NAME}}{{.EXE}} {{.ENTRY_POINT}}
sources:
- ./**/*.go
generates:
- "{{.BINARY_NAME}}{{.EXE}}"
run:
desc: Run the application directly (dev mode)
cmds:
- go run {{.ENTRY_POINT}}
clean:
desc: Remove previous build
cmds:
- rm -f {{.BINARY_NAME}}{{.EXE}}
- rm -f {{.BINARY_NAME}}
ignore_error: true
test:
desc: Run tests
cmds:
- go test -v ./...
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
fmt:
desc: Format code
cmds:
- go fmt ./...
tidy:
desc: Tidy go modules
cmds:
- go mod tidy
check:
desc: Run formatting, linting, and tests
cmds:
- task: tidy
- task: fmt
- task: lint
- task: test
all:
desc: Run checks and build
cmds:
- task: check
- task: build
pre-push:
desc: Safety check before pushing
cmds:
- task: check
up:
desc: Start the bot using Docker Compose
cmds:
- docker compose up -d --build
down:
desc: Stop Docker Compose services
cmds:
- docker compose down
logs:
desc: View clean bot logs (no prefix)
cmds:
- docker compose logs -f --no-log-prefix zee-mirror