-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
90 lines (77 loc) · 2.07 KB
/
Copy pathTaskfile.yml
File metadata and controls
90 lines (77 loc) · 2.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
version: "3"
vars:
VERSION: "{{.VERSION|default:dev}}"
BUILD_DIR: "build"
GO: go
EXE: "{{.EXE|default:}}"
tasks:
dev:
desc: "Run in dev mode (hot reload)"
cmds:
- cmd: cd frontend && npm run dev
background: true
- cmd: "{{.GO}} run -tags dev .
env:
CGO_ENABLED: "1"
build-frontend:
desc: "Build the Vite frontend"
cmds:
- cd frontend && npm run build
build:
desc: "Build production binary"
deps: [build-frontend]
cmds:
- cmd: "{{.GO}} build -ldflags \"-X main.Version={{.VERSION}}\" -o {{.BUILD_DIR}}/gluwi{{.EXE}} .
env:
CGO_ENABLED: "1"
test:
desc: "Run Go tests"
cmds:
- "{{.GO}} test ./..."
lint:
desc: "Run linters"
cmds:
- "{{.GO}} vet ./..."
- cd frontend && npx tsc --noEmit
typecheck:
desc: "TypeScript type check"
cmds:
- cd frontend && npx tsc --noEmit
package:
desc: "Package for current platform"
deps: [build]
cmds:
- task: package-windows
platforms: [windows]
- task: package-darwin
platforms: [darwin]
- task: package-linux
platforms: [linux]
package-windows:
desc: "Package Windows installer + portable"
internal: true
cmds:
- "Compress-Archive -Path {{.BUILD_DIR}}/gluwi.exe -DestinationPath {{.BUILD_DIR}}/gluwi-{{.VERSION}}-windows-amd64.zip"
platforms: [windows]
package-darwin:
desc: "Package macOS app bundle + DMG"
internal: true
cmds:
- "bash scripts/build-macos.sh {{.VERSION}}"
platforms: [darwin]
package-linux:
desc: "Package Linux AppImage + tar.gz"
internal: true
cmds:
- "bash scripts/build-linux.sh {{.VERSION}}"
platforms: [linux]
feed:
desc: "Generate Atom feed from build artifacts"
cmds:
- "{{.GO}} run ./cmd/genfeed -dir {{.BUILD_DIR}} -out releases.xml -version {{.VERSION}}"
release:
desc: "Full release build"
deps: [package, feed]
cmds:
- "sha256sum {{.BUILD_DIR}}/gluwi-* > {{.BUILD_DIR}}/checksums.txt"
platforms: [linux, darwin]