46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
version: '3'
|
||
|
||
vars:
|
||
APP_NAME: "code-count"
|
||
BIN_DIR: "bin"
|
||
PACKAGE_MANAGER: '{{.PACKAGE_MANAGER | default "npm"}}'
|
||
VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
|
||
# Target OS for build/package/run. Defaults to the host OS, and is overridden
|
||
# by `wails3 build GOOS=...` (or the GOOS env var) for cross-compilation.
|
||
GOOS: '{{.GOOS | default OS}}'
|
||
|
||
includes:
|
||
common: ./build/Taskfile.yml
|
||
windows: ./build/windows/Taskfile.yml
|
||
darwin: ./build/darwin/Taskfile.yml
|
||
linux: ./build/linux/Taskfile.yml
|
||
|
||
tasks:
|
||
build:
|
||
summary: Builds the application
|
||
cmds:
|
||
- task: "{{.GOOS}}:build"
|
||
|
||
package:
|
||
summary: Packages a production build of the application (+ nl-pms-api when changed)
|
||
cmds:
|
||
- task: api:package
|
||
- task: "{{.GOOS}}:package"
|
||
|
||
# 打包云端 API:源码有改动才重编;FORCE=1 强制。
|
||
# 产出 bin/nl-pms-api/(linux/amd64 二进制 + init.sql + migrations + config.example.yaml)
|
||
api:package:
|
||
summary: Packages nl-pms-api into bin/nl-pms-api (skip if unchanged)
|
||
cmds:
|
||
- powershell -NoProfile -ExecutionPolicy Bypass -File ./tools/package-api.ps1 {{if eq .FORCE "1"}}-Force{{end}}
|
||
|
||
run:
|
||
summary: Runs the application
|
||
cmds:
|
||
- task: "{{.GOOS}}:run"
|
||
|
||
dev:
|
||
summary: Runs the application in development mode
|
||
cmds:
|
||
- wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
|