-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathTaskfile.yml
More file actions
169 lines (143 loc) · 4.43 KB
/
Copy pathTaskfile.yml
File metadata and controls
169 lines (143 loc) · 4.43 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version: "3"
vars:
VERSION:
sh: grep '"version"' web/package.json | head -1 | sed 's/.*"version".*"\([^"]*\)".*/\1/'
COMMIT:
sh: git rev-parse --short HEAD 2>/dev/null || echo "unknown"
BUILD_TIME:
sh: date -u '+%Y-%m-%dT%H:%M:%SZ'
LDFLAGS: -X github.com/awsl-project/maxx/internal/version.Version={{.VERSION}} -X github.com/awsl-project/maxx/internal/version.Commit={{.COMMIT}} -X github.com/awsl-project/maxx/internal/version.BuildTime={{.BUILD_TIME}}
tasks:
dev:
desc: Run full-stack development (backend + frontend)
deps: [dev:backend, dev:frontend]
dev:backend:
desc: Run backend development server
cmds:
- go run cmd/maxx/main.go
dev:frontend:
desc: Run frontend development server
dir: web
cmds:
- pnpm dev
dev:desktop:
desc: Run Wails desktop application in development mode
cmds:
- wails dev
install:
desc: Install all dependencies
cmds:
- task: install:frontend
- task: install:wails
install:frontend:
desc: Install frontend dependencies
dir: web
cmds:
- pnpm install
install:wails:
desc: Install Wails CLI
cmds:
- go install github.com/wailsapp/wails/v2/cmd/wails@latest
build:
desc: Build complete application (frontend + backend)
cmds:
- task: build:frontend
- task: build:backend
build:frontend:
desc: Build frontend
dir: web
env:
VITE_COMMIT: "{{.COMMIT}}"
cmds:
- pnpm build
build:backend:
desc: Build backend with version info
cmds:
- go build -ldflags '{{.LDFLAGS}}' -o maxx cmd/maxx/main.go
build:cli:
desc: Build the maxx-cli headless admin client
cmds:
- go build -ldflags '{{.LDFLAGS}}' -o maxx-cli ./cmd/maxx-cli
install:cli:
desc: Install maxx-cli to $GOBIN
cmds:
- go install -ldflags '{{.LDFLAGS}}' ./cmd/maxx-cli
test:e2e:
desc: Run E2E tests
cmds:
- go test -v -count=1 -timeout 300s ./tests/e2e/...
test:e2e:race:
desc: Run E2E tests with race detection
cmds:
- go test -v -count=1 -timeout 300s -race ./tests/e2e/...
test:all:
desc: Run all tests (unit + E2E)
cmds:
- go test -v -count=1 -timeout 600s ./...
test:integration:
desc: Run Docker integration tests (requires .env with AWS credentials)
cmds:
- bash tests/integration/run.sh
clean:
desc: Clean build artifacts
cmds:
- rm -f maxx maxx-cli
- rm -rf web/dist
version:
desc: Show version info
cmds:
- 'echo "Version: {{.VERSION}}"'
- 'echo "Commit: {{.COMMIT}}"'
- 'echo "Build: {{.BUILD_TIME}}"'
docker:
desc: Build Docker image
cmds:
- docker build --build-arg VERSION={{.VERSION}} --build-arg COMMIT={{.COMMIT}} --build-arg BUILD_TIME={{.BUILD_TIME}} --build-arg VITE_COMMIT={{.COMMIT}} -t maxx .
build:desktop:
desc: Build Wails desktop application for current platform
cmds:
- wails build -ldflags '{{.LDFLAGS}}' -debug
build:desktop:darwin:
desc: Build Wails desktop application for macOS (both arm64 and amd64)
cmds:
- wails build -ldflags '{{.LDFLAGS}}' -platform darwin/arm64
- wails build -ldflags '{{.LDFLAGS}}' -platform darwin/amd64
build:desktop:windows:
desc: Build Wails desktop application for Windows
cmds:
- wails build -ldflags '{{.LDFLAGS}}' -platform windows/amd64
build:desktop:linux:
desc: Build Wails desktop application for Linux
cmds:
- wails build -ldflags '{{.LDFLAGS}}' -platform linux/amd64
build:desktop:all:
desc: Build Wails desktop application for all platforms
cmds:
- task: build:desktop:darwin
- task: build:desktop:windows
- task: build:desktop:linux
build:dmg:
desc: Build macOS DMG installer with Applications shortcut
platforms: [darwin]
cmds:
- wails build -ldflags '{{.LDFLAGS}}'
- |
cd build/bin
APP_NAME=$(ls -d *.app | head -n 1)
if [ -z "$APP_NAME" ]; then
echo "Error: App bundle not found"
exit 1
fi
rm -f maxx.dmg
create-dmg \
--volname "maxx" \
--volicon "../../build/appicon.png" \
--window-pos 200 120 \
--window-size 660 400 \
--icon-size 100 \
--icon "$APP_NAME" 180 170 \
--hide-extension "$APP_NAME" \
--app-drop-link 480 170 \
"maxx.dmg" \
"$APP_NAME"
echo "Created: build/bin/maxx.dmg"