-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
87 lines (75 loc) · 2.71 KB
/
Copy pathTaskfile.yaml
File metadata and controls
87 lines (75 loc) · 2.71 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:
APP_NAME: miya-desktop
BIN_DIR: bin
VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
APP_VERSION: '{{.APP_VERSION | default "dev"}}'
WINDOWS_SYSO: wails_windows_amd64.syso
WINDOWS_INFO: build/windows/info.generated.json
WINDOWS_MANIFEST: build/windows/wails.generated.exe.manifest
WAILS3: go tool wails3
tasks:
app:build:
summary: Build the Miya Desktop spike binary.
cmds:
- cd frontend && npm run build
- mkdir -p {{.BIN_DIR}}
- go build -o {{.BIN_DIR}}/{{.APP_NAME}} .
build:backend:
summary: Build only the Go backend for dev mode.
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -gcflags=all="-N -l" -o {{.BIN_DIR}}/{{.APP_NAME}} .
generate:icons:
summary: Generate platform icons from build/appicon.png.
cmds:
- "{{.WAILS3}} generate icons -input build/appicon.png -macfilename build/darwin/icons.icns -windowsfilename build/windows/icon.ico -macassetdir build/darwin"
build:
summary: Build the Miya Desktop spike binary.
cmds:
- task: app:build
darwin:build:
cmds:
- task: app:build
windows:build:
cmds:
- cd frontend && npm run build
- mkdir -p {{.BIN_DIR}}
- node scripts/windows-info.mjs {{.WINDOWS_INFO}} {{.APP_VERSION}}
- node scripts/windows-manifest.mjs {{.WINDOWS_MANIFEST}} {{.APP_VERSION}}
- "{{.WAILS3}} generate syso -arch amd64 -icon build/windows/icon.ico -manifest {{.WINDOWS_MANIFEST}} -info {{.WINDOWS_INFO}} -out {{.WINDOWS_SYSO}}"
- GOOS=windows GOARCH=amd64 go build -ldflags "-X main.appVersion={{.APP_VERSION}} -H windowsgui" -o {{.BIN_DIR}}/{{.APP_NAME}}.exe .
- rm -f {{.WINDOWS_SYSO}} {{.WINDOWS_INFO}} {{.WINDOWS_MANIFEST}}
linux:build:
cmds:
- task: app:build
run:
summary: Run the Miya Desktop spike binary.
deps:
- app:build
cmds:
- ./{{.BIN_DIR}}/{{.APP_NAME}}
run:dev:
summary: Run the current dev binary.
cmds:
- |
if [ "$(uname)" = "Darwin" ]; then
app="{{.BIN_DIR}}/{{.APP_NAME}}.dev.app"
mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources"
cp build/darwin/icons.icns "$app/Contents/Resources/icons.icns"
cp build/darwin/Info.dev.plist "$app/Contents/Info.plist"
cp "{{.BIN_DIR}}/{{.APP_NAME}}" "$app/Contents/MacOS/{{.APP_NAME}}"
codesign --force --deep --sign - "$app"
"$app/Contents/MacOS/{{.APP_NAME}}"
else
./{{.BIN_DIR}}/{{.APP_NAME}}
fi
frontend:dev:
summary: Run the Vite frontend dev server.
dir: frontend
cmds:
- npm run dev
dev:
summary: Run the Wails v3 dev loop.
cmds:
- "{{.WAILS3}} dev -config ./build/config.yml -port {{.VITE_PORT}}"