Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
46 lines (38 loc) · 1.86 KB
/
Copy pathTaskfile.yml
File metadata and controls
46 lines (38 loc) · 1.86 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
version: '3'
# Wails v3 entry point. The v2 main stays available through `wails`/wails.json;
# this Taskfile drives `wails3 dev`, `wails3 build` and `wails3 package` for the
# v3 desktop app. CI uses the same tasks through scripts/ci-build-wails3-release.sh.
vars:
APP_NAME: GoNavi
BIN_DIR: bin
EXE_EXT: '{{if eq OS "windows"}}.exe{{end}}'
WAILS_VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
tasks:
prebuild:
desc: Refresh derived assets and verify the Linux toolchain
cmds:
- node scripts/wails-pre-build.mjs "{{OS}}/{{ARCH}}"
dev:frontend:
desc: Run the Vite dev server for wails3 dev
cmds:
- npm --prefix frontend run dev -- --port {{.WAILS_VITE_PORT}} --strictPort
build:
desc: Build the Wails v3 application (DEV=true skips the frontend build)
deps:
- prebuild
cmds:
# macOS dev builds go into an .app so WebKit uses the production bundle
# identifier and therefore the same localStorage container as latest.
- '{{if eq .DEV "true"}}{{if eq OS "darwin"}}node scripts/build-wails3-dev-app.mjs "{{.BIN_DIR}}" "{{.APP_NAME}}"{{else}}go build -tags wails3 -trimpath -buildvcs=false -ldflags "-X GoNavi-Wails/internal/app.AppVersion=dev-local -X main.devBuild=1" -o {{.BIN_DIR}}/{{.APP_NAME}}{{.EXE_EXT}} ./cmd/wails3app{{end}}{{else}}bash scripts/ci-build-wails3-release.sh "{{OS}}/{{ARCH}}" "{{.APP_NAME}}" "$(cat version/dev-version.txt)"{{end}}'
run:
desc: Run the last development build
cmds:
- '{{if eq OS "darwin"}}{{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/MacOS/{{.APP_NAME}}{{else}}{{.BIN_DIR}}/{{.APP_NAME}}{{.EXE_EXT}}{{end}}'
dev:
desc: Run the v3 development loop (Vite + Go hot restart)
cmds:
- wails3 dev -config ./build/config.yml -port {{.WAILS_VITE_PORT}}
package:
desc: Build the platform artifact for the existing release packaging
cmds:
- task: build