-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTaskfile.yml
More file actions
152 lines (125 loc) · 4.07 KB
/
Copy pathTaskfile.yml
File metadata and controls
152 lines (125 loc) · 4.07 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
version: '3'
vars:
APP_NAME: "XenSQL"
BIN_DIR: "bin"
PACKAGE_MANAGER: '{{.PACKAGE_MANAGER | default "npm"}}'
VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
COMPOSE: '{{.COMPOSE | default "docker compose"}}'
includes:
common: ./build/Taskfile.yml
windows: ./build/windows/Taskfile.yml
darwin: ./build/darwin/Taskfile.yml
linux: ./build/linux/Taskfile.yml
ios: ./build/ios/Taskfile.yml
android: ./build/android/Taskfile.yml
tasks:
build:
summary: Builds the application
cmds:
- task: "{{OS}}:build"
package:
summary: Packages a production build of the application
cmds:
- task: "{{OS}}:package"
run:
summary: Runs the application
cmds:
- task: "{{OS}}:run"
dev:
summary: Runs the application in development mode
cmds:
- wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
setup:docker:
summary: Builds Docker image for cross-compilation (~800MB download)
cmds:
- task: common:setup:docker
build:server:
summary: Builds the application in server mode (no GUI, HTTP server only)
cmds:
- task: common:build:server
run:server:
summary: Runs the application in server mode
cmds:
- task: common:run:server
build:docker:
summary: Builds a Docker image for server mode deployment
cmds:
- task: common:build:docker
run:docker:
summary: Builds and runs the Docker image
cmds:
- task: common:run:docker
test:
summary: Runs the Go unit tests (embedded SQLite, no database servers needed)
cmds:
- go test ./internal/...
bump-version:
summary: Show bump-version usage (wails3 task does not forward CLI flags)
cmds:
- go run ./scripts/bump-version.go -help
bump-version:minor:
summary: Bump minor version, then refresh build assets
cmds:
- go run ./scripts/bump-version.go -minor
bump-version:patch:
summary: Bump patch version, then refresh build assets
cmds:
- go run ./scripts/bump-version.go -patch
bump-version:major:
summary: Bump major version, then refresh build assets
cmds:
- go run ./scripts/bump-version.go -major
bump-version:sync:
summary: Sync non-build files to version.go, then refresh build assets
cmds:
- go run ./scripts/bump-version.go -sync
bump-version:dry-run:minor:
summary: Preview a minor version bump
cmds:
- go run ./scripts/bump-version.go -dry-run -minor
bump-version:dry-run:patch:
summary: Preview a patch version bump
cmds:
- go run ./scripts/bump-version.go -dry-run -patch
bump-version:dry-run:major:
summary: Preview a major version bump
cmds:
- go run ./scripts/bump-version.go -dry-run -major
bump-version:set:*:
summary: Set an explicit version (e.g. bump-version:set:1.2.0)
vars:
VERSION: '{{index .MATCH 0}}'
cmds:
- go run ./scripts/bump-version.go {{.VERSION}}
build:check:
summary: Compiles the app and every internal package without a full frontend build
cmds:
# Stub the embedded frontend so the //go:embed in main.go resolves; the real
# assets come from `wails3 task build`.
- mkdir -p frontend/dist
- touch frontend/dist/.gitkeep
- go build . ./internal/...
e2e:
summary: Runs the E2E suite against an already-running database stack (see e2e:up)
cmds:
- go test -tags e2e -count=1 -run TestE2E -v ./internal/app/
e2e:up:
summary: Brings the database stack up and blocks until every server is healthy
cmds:
- "{{.COMPOSE}} up -d --wait"
e2e:down:
summary: Tears the database stack down and discards its volumes
cmds:
- "{{.COMPOSE}} down -v"
e2e:logs:
summary: Prints the database stack logs
cmds:
- "{{.COMPOSE}} logs --no-color"
e2e:all:
summary: One-shot E2E - bring the stack up, run the suite, then always tear it down
cmds:
# defer registers first so teardown runs even if the suite (or startup) fails;
# the task still exits non-zero when the suite fails.
- defer: { task: e2e:down }
- task: e2e:up
- task: e2e