Update v3/internal/commands/build_assets/linux/Taskfile.yml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Lea Anthony 2025-06-12 07:26:58 +10:00 committed by GitHub
commit 3916554e54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,14 @@ tasks:
cmds:
- go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/{{.APP_NAME}}
vars:
BUILD_FLAGS: '{{if eq .STATIC "true"}}-tags production -trimpath -buildvcs=false -ldflags="-w -s -linkmode external -extldflags '\''-static'\''"{{else if eq .PRODUCTION "true"}}-tags production -trimpath -buildvcs=false -ldflags="-w -s"{{else}}-buildvcs=false -gcflags=all="-l"{{end}}'
BUILD_FLAGS: >-
{{ if eq .STATIC "true" }}
-tags production -trimpath -buildvcs=false -ldflags="-w -s -linkmode external -extldflags '-static'"
{{ else if eq .PRODUCTION "true" }}
-tags production -trimpath -buildvcs=false -ldflags="-w -s"
{{ else }}
-buildvcs=false -gcflags=all="-l"
{{ end }}
env:
GOOS: linux
CGO_ENABLED: 1