mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
35 lines
838 B
YAML
35 lines
838 B
YAML
version: '3'
|
|
|
|
includes:
|
|
common: ../Taskfile.yml
|
|
|
|
tasks:
|
|
build:
|
|
summary: Builds the application for macOS
|
|
cmds:
|
|
- task: build:native
|
|
vars:
|
|
DEV: '{{.DEV}}'
|
|
OUTPUT: '{{.OUTPUT}}'
|
|
|
|
build:native:
|
|
summary: Builds the application natively on macOS
|
|
internal: true
|
|
deps:
|
|
- task: common:build:frontend
|
|
vars:
|
|
DEV:
|
|
ref: .DEV
|
|
cmds:
|
|
- go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
|
|
vars:
|
|
BUILD_FLAGS: '{{if eq .DEV "true"}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production -trimpath -buildvcs=false -ldflags="-w -s"{{end}}'
|
|
DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}'
|
|
OUTPUT: '{{ .OUTPUT | default .DEFAULT_OUTPUT }}'
|
|
env:
|
|
GOOS: darwin
|
|
CGO_ENABLED: 1
|
|
|
|
run:
|
|
cmds:
|
|
- '{{.BIN_DIR}}/{{.APP_NAME}}' |