* bug: fix regression preventing `-trimpath` and trim of debug symbols
* Update builder.go
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
---------
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
* Extend XCADDY_GO_BUILD_FLAGS usage (#102)
Commit 47f9ded5d8 is not sufficient alone to
ensure that all go modules are installed with write bit set because 'go mod'
or 'go get' might install modules as read-only, too.
If set, the environment variable is appended for the other go commands that
support build flags.
* Make running 'go' implicit for build environment
The method newCommand runs only go commands so let's make command 'go'
implicit and rename it to make it more verbose.
Add environment variable
XCADDY_GO_BUILD_FLAGS
to override default build arguments from environment (#102).
To support flags with variable arguments Unix-style quoting is supported.
* fix: do not use only hardcoded "go"
* fixed comments and added env to readme
* move GetGo to an internal package
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
* Run `go mod tidy` in the build environment
As of go 1.16, the `go {build,test}` commands don't modify the go.mod and go.sum files (see: https://golang.org/issue/40728). We, therefore, have to run `go mod tidy` to ensure the go.mod and go.sum files are consistent with the module requirements.
Closes#46
* check the error of `go mod tidy`
* support go.mod replace version pinning
* use string replace instead of regex
* Minor cleanups
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>