cli/cmd/lthn-desktop/build/Taskfile.yml
Snider d1f63342cb fix(ci): track Wails build config files for lthn-desktop and core-demo
Add exceptions in .gitignore to track build configuration files
(Taskfile.yml, info.json, manifests, etc.) while keeping build
outputs (bin/) ignored.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:35:51 +00:00

84 lines
2.1 KiB
YAML

version: '3'
tasks:
go:mod:tidy:
summary: Runs `go mod tidy`
internal: true
cmds:
- go mod tidy
install:public:deps:
summary: Install public dependencies
dir: frontend
sources:
- package.json
- package-lock.json
generates:
- node_modules/*
preconditions:
- sh: npm version
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
cmds:
- npm install
build:public:
label: build:public (PRODUCTION={{.PRODUCTION}})
summary: Build the public folder
dir: frontend
sources:
- "**/*"
generates:
- dist/**/*
deps:
- task: install:public:deps
- task: generate:bindings
vars:
BUILD_FLAGS:
ref: .BUILD_FLAGS
cmds:
- npm run {{.BUILD_COMMAND}} -q
env:
PRODUCTION: '{{.PRODUCTION | default "false"}}'
vars:
BUILD_COMMAND: '{{if eq .PRODUCTION "true"}}build{{else}}build:dev{{end}}'
generate:bindings:
label: generate:bindings (BUILD_FLAGS={{.BUILD_FLAGS}})
summary: Generates bindings
deps:
- task: go:mod:tidy
sources:
- "**/*.[jt]s"
- exclude: frontend/**/*
- frontend/bindings/**/*
- "**/*.go"
- go.mod
- go.sum
generates:
- frontend/bindings/**/*
cmds:
- wails3 generate bindings -d frontend/bindings -f '{{.BUILD_FLAGS}}' -clean=true -ts
generate:icons:
summary: Generates Windows `.ico` and Mac `.icns` files from an image
dir: build
sources:
- "appicon.png"
generates:
- "darwin/icons.icns"
- "windows/icon.ico"
cmds:
- wails3 generate icons -input appicon.png -macfilename darwin/icons.icns -windowsfilename windows/icon.ico
dev:public:
summary: Runs the frontend dev server for live development
dir: frontend
deps:
- task: install:public:deps
cmds:
- npm start -- --port {{.VITE_PORT | default "4200"}}
update:build-assets:
summary: Updates the build assets
cmds:
- wails3 update build-assets -name "{{.APP_NAME}}" -binaryname "{{.APP_NAME}}" -config config.yml -dir .