5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 07:10:40 +08:00
wails/v3/Taskfile.yaml
2025-01-10 16:04:31 +11:00

132 lines
2.5 KiB
YAML

# https://taskfile.dev
version: "3"
includes:
generator:
taskfile: ./internal/generator
dir: ./internal/generator
runtime:
taskfile: ./internal/runtime
dir: ./internal/runtime
website:
taskfile: ./website
dir: ./website
optional: true
docs:
taskfile: ../docs
dir: ../docs
optional: true
tasks:
recreate-template-dir:
dir: internal/templates
internal: true
silent: true
cmds:
- rm -rf {{.TEMPLATE_DIR}}
- mkdir -p {{.TEMPLATE_DIR}}
install:
dir: cmd/wails3
silent: true
cmds:
- go install
- echo "Installed wails CLI"
release:
summary: Release a new version of Wails. Call with `task v3:release -- <version>`
dir: tasks/release
cmds:
- go run release.go {{.CLI_ARGS}}
taskfile:upgrade:
cmds:
- go get -u github.com/go-task/task/v3
reinstall-cli:
dir: cmd/wails3
internal: true
silent: true
cmds:
- go install
- echo "Reinstalled wails CLI"
generate:events:
dir: tasks/events
cmds:
- go run generate.go
precommit:
cmds:
- go test ./...
- task: format
# - task: docs:update:api
test:example:darwin:
dir: 'examples/{{.DIR}}'
platforms:
- darwin
cmds:
- echo "Building example {{.DIR}}"
- go mod tidy
- go build -o "testbuild-{{.DIR}}{{exeExt}}"
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
CGO_CFLAGS: -mmacosx-version-min=10.13
test:example:notdarwin:
dir: 'examples/{{.DIR}}'
platforms:
- linux
- windows
cmds:
- echo "Building example {{.DIR}}"
- go mod tidy
- go build -o "testbuild-{{.DIR}}{{exeExt}}"
test:examples:
summary: Builds the examples
dir: examples
vars:
EXAMPLEDIRS: |
binding
build
clipboard
contextmenus
dialogs
dialogs-basic
drag-n-drop
environment
events
frameless
hide-window
ignore-mouse
keybindings
menu
plain
raw-message
screen
services
show-macos-toolbar
systray-basic
systray-menu
systray-custom
video
window
window-api
wml
cmds:
- for: { var: EXAMPLEDIRS }
task: test:example:darwin
vars:
DIR: "{{.ITEM}}"
- for: { var: EXAMPLEDIRS }
task: test:example:notdarwin
vars:
DIR: "{{.ITEM}}"