You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The override mechanism proposed by @stanislav-zaprudskiy in #352 is
problematic because --warn-undefined-variables makes noise about it:
```shellSession
$ make
Makefile:67: warning: undefined variable 'GO_BUILDFLAGS'
Makefile:68: warning: undefined variable 'GO_LDFLAGS'
Makefile:69: warning: undefined variable 'GO_TESTFLAGS'
Makefile:70: warning: undefined variable 'GO_TESTENV'
Makefile:71: warning: undefined variable 'GO_BUILDENV'
env go build -mod vendor -ldflags '-s -w ...
```
However, through much experimentation, I discovered that the += operator
behaves in the intended way, as documented in the new generated comment.
build.addDefinition("# To add additional flags or values, specify the variable in the environment, e.g. `GO_BUILDFLAGS='-tags experimental' make`.")
215
+
build.addDefinition("# To override the default flags or values, specify the variable on the command line, e.g. `make GO_BUILDFLAGS='-tags experimental'`.")
0 commit comments