gui/cmd/examples/core-task-change/tasks/build-darwin.yml
Snider 032c426ac3 feat: initial Wails v3 desktop framework
GUI packages, examples, and documentation for building
desktop applications with Go and web technologies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:44:23 +00:00

39 lines
1.2 KiB
YAML

version: '3'
# This file contains the build logic specifically for the macOS (Darwin) platform.
includes:
common: ./common.yml
tasks:
build:
desc: "Builds the application for macOS."
dir: "{{.APP_ROOT}}"
deps:
- task: common:go:mod:tidy
- task: common:build:public
vars:
PRODUCTION: '{{.PRODUCTION | default "false"}}'
- task: common:generate:icons
cmds:
- go build {{.BUILD_FLAGS}} -o bin/{{.APP_NAME}}
vars:
BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production -trimpath -buildvcs=false -ldflags="-w -s"{{else}}-buildvcs=false -gcflags=all="-l"{{end}}'
env:
GOOS: darwin
CGO_ENABLED: 1
GOARCH: '{{.ARCH | default "amd64"}}'
PRODUCTION: '{{.PRODUCTION | default "false"}}'
package:
desc: "Packages the application as a .app bundle for macOS."
dir: "{{.APP_ROOT}}"
deps:
- task: build
vars:
PRODUCTION: "true"
cmds:
- echo "Packaging for macOS..."
# This command assumes Wails handles the bundling process.
# You may need to adjust based on your specific packaging tool.
- wails3 build -package -platform darwin/{{.ARCH | default "amd64"}} -production -clean -o "{{.APP_NAME}}.app"