Taskfile.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. version: '3'
  2. vars:
  3. APP_NAME: "mpckit"
  4. # Shown in the About dialog of production builds: the version, and the
  5. # commit it was built from ("-dirty" if there were uncommitted changes).
  6. # Keep APP_VERSION in step with `version` in build/config.yml.
  7. APP_VERSION: "0.5.0"
  8. COMMIT:
  9. sh: git describe --always --dirty --exclude "*" 2>/dev/null || echo unknown
  10. BIN_DIR: "bin"
  11. PACKAGE_MANAGER: '{{.PACKAGE_MANAGER | default "npm"}}'
  12. VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}'
  13. # Target OS for build/package/run. Defaults to the host OS, and is overridden
  14. # by `wails3 build GOOS=...` (or the GOOS env var) for cross-compilation. The
  15. # tasks below dispatch to the matching platform Taskfile via this variable.
  16. GOOS: '{{.GOOS | default OS}}'
  17. includes:
  18. common: ./build/Taskfile.yml
  19. windows: ./build/windows/Taskfile.yml
  20. darwin: ./build/darwin/Taskfile.yml
  21. linux: ./build/linux/Taskfile.yml
  22. tasks:
  23. build:
  24. summary: Builds the application
  25. cmds:
  26. - task: "{{.GOOS}}:build"
  27. package:
  28. summary: Packages a production build of the application
  29. cmds:
  30. - task: "{{.GOOS}}:package"
  31. run:
  32. summary: Runs the application
  33. cmds:
  34. - task: "{{.GOOS}}:run"
  35. dev:
  36. summary: Runs the application in development mode
  37. cmds:
  38. - wails3 dev -config ./build/config.yml -port {{.VITE_PORT}}
  39. build:server:
  40. summary: Builds the application in server mode (no GUI, HTTP server only)
  41. cmds:
  42. - task: common:build:server
  43. run:server:
  44. summary: Runs the application in server mode
  45. cmds:
  46. - task: common:run:server