Skip to content

Commit 404382f

Browse files
committed
Add LDFLAGS taskfile variable to build command
Even though the project does not have any such flags at the moment, this is the established format of the "template" project assets, so adding it will facilitate syncs with the upstream assets.
1 parent 8be47b8 commit 404382f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Taskfile.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ vars:
77
DEFAULT_GO_PACKAGES:
88
sh: |
99
echo $(cd {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}} && go list ./... | tr '\n' ' ' || echo '"ERROR: Unable to discover Go packages"')
10+
LDFLAGS:
1011

1112
tasks:
1213
build:
@@ -36,7 +37,7 @@ tasks:
3637
desc: Build the Go code
3738
dir: "{{.DEFAULT_GO_MODULE_PATH}}"
3839
cmds:
39-
- go build -v -o libraries-repository-engine{{exeExt}}
40+
- go build -v -o libraries-repository-engine{{exeExt}} {{.LDFLAGS}}
4041

4142
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
4243
go:test:

0 commit comments

Comments
 (0)