diff --git a/go.mod b/go.mod index 8516c944f4..b116247e64 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,7 @@ require ( gopkg.in/d4l3k/messagediff.v1 v1.2.1 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a - src.techknowlogick.com/xgo v0.0.0-20190507142556-a5b29ecb0ff4 + src.techknowlogick.com/xgo v0.0.0-20200319213703-c43d4c44a6ac src.techknowlogick.com/xormigrate v1.1.0 xorm.io/builder v0.3.6 xorm.io/core v0.7.3 diff --git a/go.sum b/go.sum index efe30f88f4..8a8c4e4b4d 100644 --- a/go.sum +++ b/go.sum @@ -476,6 +476,8 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a h1:LJwr7TCTghdatWv40WobzlK honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= src.techknowlogick.com/xgo v0.0.0-20190507142556-a5b29ecb0ff4 h1:DZKMg4qnT7UIyB5ZaC6ZqltF2K5KhA1oQ2PdxOLZ3jg= src.techknowlogick.com/xgo v0.0.0-20190507142556-a5b29ecb0ff4/go.mod h1:Ood88figJtEukTnU20P1IrXhyAkbOIGi4YzmeHVtGH0= +src.techknowlogick.com/xgo v0.0.0-20200319213703-c43d4c44a6ac h1:7yl6vmo+RWjT/qFoMlJE1smvs83j/c7x9sDNTz3n/BM= +src.techknowlogick.com/xgo v0.0.0-20200319213703-c43d4c44a6ac/go.mod h1:31CE1YKtDOrKTk9PSnjTpe6YbO6W/0LTYZ1VskL09oU= src.techknowlogick.com/xormigrate v1.1.0 h1:Ob79c1pOO+voMB9roa2eHZByT+TODwC51+Mn9e3HoTI= src.techknowlogick.com/xormigrate v1.1.0/go.mod h1:IMdvIk60uPX+IUsaXbdtqFzl3n7PfRg/cSZxxsiCWf8= xorm.io/builder v0.3.6 h1:ha28mQ2M+TFx96Hxo+iq6tQgnkC9IZkM6D8w9sKHHF8= diff --git a/vendor/modules.txt b/vendor/modules.txt index 3bb295c8e5..c0f726ad61 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -271,7 +271,7 @@ honnef.co/go/tools/staticcheck/vrp honnef.co/go/tools/stylecheck honnef.co/go/tools/unused honnef.co/go/tools/version -# src.techknowlogick.com/xgo v0.0.0-20190507142556-a5b29ecb0ff4 +# src.techknowlogick.com/xgo v0.0.0-20200319213703-c43d4c44a6ac src.techknowlogick.com/xgo # src.techknowlogick.com/xormigrate v1.1.0 src.techknowlogick.com/xormigrate diff --git a/vendor/src.techknowlogick.com/xgo/.drone.jsonnet b/vendor/src.techknowlogick.com/xgo/.drone.jsonnet index e76e751238..2d3f8d2367 100644 --- a/vendor/src.techknowlogick.com/xgo/.drone.jsonnet +++ b/vendor/src.techknowlogick.com/xgo/.drone.jsonnet @@ -1,4 +1,4 @@ -local BuildSwitchDryRun(version='go-latest', tags='latest', dry=false) = { +local BuildSwitchDryRun(version='go-latest', tags='latest', dry=false, depends='') = { name: if dry then 'dry-run-' + version else 'build-' + version, pull: 'always', image: 'plugins/docker', @@ -15,39 +15,36 @@ local BuildSwitchDryRun(version='go-latest', tags='latest', dry=false) = { tags: tags, dry_run: dry }, + [if depends != '' then 'depends_on']: [ + depends + ], [if !dry then 'when']: { branch: ['master'], event: {exclude: ['pull_request']} }, [if dry then 'when']: { - event: {include: ['pull_request']} + event: ['pull_request'] }, }; -local BuildWithDiffTags(version='go-latest', tags='latest') = BuildSwitchDryRun(version, tags, false); -local BuildWithDiffTagsDry(version='go-latest', tags='latest') = BuildSwitchDryRun(version, tags, true); -local BuildStep(version='go-latest') = BuildWithDiffTags(version, version); -local BuildStepDry(version='go-latest') = BuildSwitchDryRun(version, version, true); +local BuildWithDiffTags(version='go-latest', tags='latest', depends='') = BuildSwitchDryRun(version, tags, false, depends); +local BuildWithDiffTagsDry(version='go-latest', tags='latest', depends='') = BuildSwitchDryRun(version, tags, true, depends); +local BuildStep(version='go-latest', depends='') = BuildWithDiffTags(version, version, depends); +local BuildStepDry(version='go-latest', depends='') = BuildSwitchDryRun(version, version, true, depends); { kind: 'pipeline', name: 'default', steps: [ BuildStepDry('base'), - BuildStepDry('go-1.12.5'), - BuildStepDry('go-1.11.10'), + BuildStepDry('go-1.14.1', 'dry-run-base'), + BuildStepDry('go-1.13.9', 'dry-run-base'), BuildStep('base'), - BuildStep('go-1.12.5'), - BuildStep('go-1.12.x'), - BuildWithDiffTags(), - BuildStep('go-1.11.10'), - BuildStep('go-1.11.x'), - BuildStep('go-1.12.4'), - BuildStep('go-1.12.3'), - BuildStep('go-1.12.2'), - BuildStep('go-1.12.1'), - BuildStep('go-1.12.0'), - BuildStep('go-1.11.9'), + BuildStep('go-1.14.1', 'build-base'), + BuildStep('go-1.14.x', 'build-go-1.14.1'), + BuildStep('go-1.13.9', 'build-base'), + BuildStep('go-1.13.x', 'build-go-1.13.9'), + BuildWithDiffTags('go-latest', 'latest', 'build-go-1.14.x'), ] } diff --git a/vendor/src.techknowlogick.com/xgo/.drone.yml b/vendor/src.techknowlogick.com/xgo/.drone.yml index 264717d6a6..ae225b5089 100644 --- a/vendor/src.techknowlogick.com/xgo/.drone.yml +++ b/vendor/src.techknowlogick.com/xgo/.drone.yml @@ -24,39 +24,43 @@ steps: event: - pull_request -- name: dry-run-go-1.12.5 +- name: dry-run-go-1.14.1 pull: always image: plugins/docker settings: - context: docker/go-1.12.5 - dockerfile: docker/go-1.12.5/Dockerfile + context: docker/go-1.14.1 + dockerfile: docker/go-1.14.1/Dockerfile dry_run: true password: from_secret: docker_password repo: techknowlogick/xgo - tags: go-1.12.5 + tags: go-1.14.1 username: from_secret: docker_username when: event: - pull_request + depends_on: + - dry-run-base -- name: dry-run-go-1.11.10 +- name: dry-run-go-1.13.9 pull: always image: plugins/docker settings: - context: docker/go-1.11.10 - dockerfile: docker/go-1.11.10/Dockerfile + context: docker/go-1.13.9 + dockerfile: docker/go-1.13.9/Dockerfile dry_run: true password: from_secret: docker_password repo: techknowlogick/xgo - tags: go-1.11.10 + tags: go-1.13.9 username: from_secret: docker_username when: event: - pull_request + depends_on: + - dry-run-base - name: build-base pull: always @@ -77,16 +81,16 @@ steps: exclude: - pull_request -- name: build-go-1.12.5 +- name: build-go-1.14.1 pull: always image: plugins/docker settings: - context: docker/go-1.12.5 - dockerfile: docker/go-1.12.5/Dockerfile + context: docker/go-1.14.1 + dockerfile: docker/go-1.14.1/Dockerfile password: from_secret: docker_password repo: techknowlogick/xgo - tags: go-1.12.5 + tags: go-1.14.1 username: from_secret: docker_username when: @@ -95,17 +99,19 @@ steps: event: exclude: - pull_request + depends_on: + - build-base -- name: build-go-1.12.x +- name: build-go-1.14.x pull: always image: plugins/docker settings: - context: docker/go-1.12.x - dockerfile: docker/go-1.12.x/Dockerfile + context: docker/go-1.14.x + dockerfile: docker/go-1.14.x/Dockerfile password: from_secret: docker_password repo: techknowlogick/xgo - tags: go-1.12.x + tags: go-1.14.x username: from_secret: docker_username when: @@ -114,6 +120,50 @@ steps: event: exclude: - pull_request + depends_on: + - build-go-1.14.1 + +- name: build-go-1.13.9 + pull: always + image: plugins/docker + settings: + context: docker/go-1.13.9 + dockerfile: docker/go-1.13.9/Dockerfile + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: go-1.13.9 + username: + from_secret: docker_username + when: + branch: + - master + event: + exclude: + - pull_request + depends_on: + - build-base + +- name: build-go-1.13.x + pull: always + image: plugins/docker + settings: + context: docker/go-1.13.x + dockerfile: docker/go-1.13.x/Dockerfile + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: go-1.13.x + username: + from_secret: docker_username + when: + branch: + - master + event: + exclude: + - pull_request + depends_on: + - build-go-1.13.9 - name: build-go-latest pull: always @@ -133,157 +183,7 @@ steps: event: exclude: - pull_request - -- name: build-go-1.11.10 - pull: always - image: plugins/docker - settings: - context: docker/go-1.11.10 - dockerfile: docker/go-1.11.10/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.11.10 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.11.x - pull: always - image: plugins/docker - settings: - context: docker/go-1.11.x - dockerfile: docker/go-1.11.x/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.11.x - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.12.4 - pull: always - image: plugins/docker - settings: - context: docker/go-1.12.4 - dockerfile: docker/go-1.12.4/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.12.4 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.12.3 - pull: always - image: plugins/docker - settings: - context: docker/go-1.12.3 - dockerfile: docker/go-1.12.3/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.12.3 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.12.2 - pull: always - image: plugins/docker - settings: - context: docker/go-1.12.2 - dockerfile: docker/go-1.12.2/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.12.2 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.12.1 - pull: always - image: plugins/docker - settings: - context: docker/go-1.12.1 - dockerfile: docker/go-1.12.1/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.12.1 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.12.0 - pull: always - image: plugins/docker - settings: - context: docker/go-1.12.0 - dockerfile: docker/go-1.12.0/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.12.0 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request - -- name: build-go-1.11.9 - pull: always - image: plugins/docker - settings: - context: docker/go-1.11.9 - dockerfile: docker/go-1.11.9/Dockerfile - password: - from_secret: docker_password - repo: techknowlogick/xgo - tags: go-1.11.9 - username: - from_secret: docker_username - when: - branch: - - master - event: - exclude: - - pull_request + depends_on: + - build-go-1.14.x ... diff --git a/vendor/src.techknowlogick.com/xgo/.gitignore b/vendor/src.techknowlogick.com/xgo/.gitignore new file mode 100644 index 0000000000..eacf87bf6b --- /dev/null +++ b/vendor/src.techknowlogick.com/xgo/.gitignore @@ -0,0 +1,2 @@ +.idea/ +xgo \ No newline at end of file diff --git a/vendor/src.techknowlogick.com/xgo/.golang_hash b/vendor/src.techknowlogick.com/xgo/.golang_hash new file mode 100644 index 0000000000..3f94799924 --- /dev/null +++ b/vendor/src.techknowlogick.com/xgo/.golang_hash @@ -0,0 +1 @@ +f452a25dd25c9f64ff3b3e3f32802a55 - diff --git a/vendor/src.techknowlogick.com/xgo/README.md b/vendor/src.techknowlogick.com/xgo/README.md index 10d3fd1c74..8bec6db95b 100644 --- a/vendor/src.techknowlogick.com/xgo/README.md +++ b/vendor/src.techknowlogick.com/xgo/README.md @@ -1,5 +1,7 @@ # xgo - Go CGO cross compiler +[![Build Status](https://cloud.drone.io/api/badges/techknowlogick/xgo/status.svg)](https://cloud.drone.io/techknowlogick/xgo) + Although Go strives to be a cross platform language, cross compilation from one platform to another is not as simple as it could be, as you need the Go sources bootstrapped to each platform and architecture. @@ -53,10 +55,8 @@ Simply specify the import path you want to build, and xgo will do the rest: ... $ ls -al - -rwxr-xr-x 1 root root 9995000 Nov 24 16:44 iris-android-16-arm -rwxr-xr-x 1 root root 6776500 Nov 24 16:44 iris-darwin-10.6-386 -rwxr-xr-x 1 root root 8755532 Nov 24 16:44 iris-darwin-10.6-amd64 - -rwxr-xr-x 1 root root 7114176 Nov 24 16:45 iris-ios-5.0-arm -rwxr-xr-x 1 root root 10135248 Nov 24 16:44 iris-linux-386 -rwxr-xr-x 1 root root 12598472 Nov 24 16:44 iris-linux-amd64 -rwxr-xr-x 1 root root 10040464 Nov 24 16:44 iris-linux-arm @@ -85,20 +85,18 @@ A handful of flags can be passed to `go build`. The currently supported ones are As newer versions of the language runtime, libraries and tools get released, these will get incorporated into xgo too as extensions layers to the base cross -compilation image (only Go 1.3 and above will be supported). +compilation image (only Go 1.13 and above will be supported). You can select which Go release to work with through the `-go` command line flag to xgo and if the specific release was already integrated, it will automatically be retrieved and installed. - $ xgo -go 1.6.1 github.com/project-iris/iris + $ xgo -go go-1.13.2 github.com/project-iris/iris Additionally, a few wildcard release strings are also supported: - `latest` will use the latest Go release (this is the default) - - `1.6.x` will use the latest point release of a specific Go version - - `1.6-develop` will use the develop branch of a specific Go version - - `develop` will use the develop branch of the entire Go repository + - `go-1.13.x` will use the latest point release of a specific Go version ### Output prefixing @@ -109,10 +107,8 @@ file prefix. This can be overridden with the `-out` flag. ... $ ls -al - -rwxr-xr-x 1 root root 9995000 Nov 24 16:44 iris-v0.3.2-android-16-arm -rwxr-xr-x 1 root root 6776500 Nov 24 16:44 iris-v0.3.2-darwin-10.6-386 -rwxr-xr-x 1 root root 8755532 Nov 24 16:44 iris-v0.3.2-darwin-10.6-amd64 - -rwxr-xr-x 1 root root 7114176 Nov 24 16:45 iris-v0.3.2-ios-5.0-arm -rwxr-xr-x 1 root root 10135248 Nov 24 16:44 iris-v0.3.2-linux-386 -rwxr-xr-x 1 root root 12598472 Nov 24 16:44 iris-v0.3.2-linux-amd64 -rwxr-xr-x 1 root root 10040464 Nov 24 16:44 iris-v0.3.2-linux-arm @@ -130,10 +126,8 @@ the desired branch name through the `--branch` argument. ... $ ls -al - -rwxr-xr-x 1 root root 4171248 Nov 24 16:40 goimports-android-16-arm -rwxr-xr-x 1 root root 4139868 Nov 24 16:40 goimports-darwin-10.6-386 -rwxr-xr-x 1 root root 5186720 Nov 24 16:40 goimports-darwin-10.6-amd64 - -rwxr-xr-x 1 root root 3202364 Nov 24 16:40 goimports-ios-5.0-arm -rwxr-xr-x 1 root root 4189456 Nov 24 16:40 goimports-linux-386 -rwxr-xr-x 1 root root 5264136 Nov 24 16:40 goimports-linux-amd64 -rwxr-xr-x 1 root root 4209416 Nov 24 16:40 goimports-linux-arm @@ -163,10 +157,8 @@ parameter to select the exact package within, honoring any prior *branch* and ... $ ls -al - -rwxr-xr-x 1 root root 4194956 Nov 24 16:38 goimports-android-16-arm -rwxr-xr-x 1 root root 4164448 Nov 24 16:38 goimports-darwin-10.6-386 -rwxr-xr-x 1 root root 5223584 Nov 24 16:38 goimports-darwin-10.6-amd64 - -rwxr-xr-x 1 root root 3222848 Nov 24 16:39 goimports-ios-5.0-arm -rwxr-xr-x 1 root root 4217184 Nov 24 16:38 goimports-linux-386 -rwxr-xr-x 1 root root 5295768 Nov 24 16:38 goimports-linux-amd64 -rwxr-xr-x 1 root root 4233120 Nov 24 16:38 goimports-linux-arm @@ -191,7 +183,7 @@ argument: The supported targets are: - * Platforms: `android`, `darwin`, `ios`, `linux`, `windows` + * Platforms: `darwin`, `linux`, `windows` * Achitectures: `386`, `amd64`, `arm-5`, `arm-6`, `arm-7`, `arm64`, `mips`, `mipsle`, `mips64`, `mips64le` ### Platform versions @@ -207,7 +199,6 @@ selection of specific platform versions by appending them to the OS target strin The supported platforms are: - * All Android APIs up to Android Lollipop 5.0 ([API level ids](https://source.android.com/source/build-numbers.html)) * All Windows APIs up to Windows 8.1 limited by `mingw-w64` ([API level ids](https://en.wikipedia.org/wiki/Windows_NT#Releases)) * OSX APIs in the range of 10.6 - 10.14 diff --git a/vendor/src.techknowlogick.com/xgo/go.mod b/vendor/src.techknowlogick.com/xgo/go.mod new file mode 100644 index 0000000000..94562112f5 --- /dev/null +++ b/vendor/src.techknowlogick.com/xgo/go.mod @@ -0,0 +1,3 @@ +module src.techknowlogick.com/xgo + +go 1.12 diff --git a/vendor/src.techknowlogick.com/xgo/xgo.go b/vendor/src.techknowlogick.com/xgo/xgo.go index efd168beae..a341db0cda 100644 --- a/vendor/src.techknowlogick.com/xgo/xgo.go +++ b/vendor/src.techknowlogick.com/xgo/xgo.go @@ -18,6 +18,7 @@ import ( "os/exec" "os/user" "path/filepath" + "regexp" "strconv" "strings" ) @@ -31,8 +32,8 @@ func init() { depsCache = filepath.Join(home, ".xgo-cache") return } - if user, err := user.Current(); user != nil && err == nil && user.HomeDir != "" { - depsCache = filepath.Join(user.HomeDir, ".xgo-cache") + if usr, err := user.Current(); usr != nil && err == nil && usr.HomeDir != "" { + depsCache = filepath.Join(usr.HomeDir, ".xgo-cache") return } depsCache = filepath.Join(os.TempDir(), "xgo-cache") @@ -70,22 +71,24 @@ type ConfigFlags struct { // Command line arguments to pass to go build var ( - buildVerbose = flag.Bool("v", false, "Print the names of packages as they are compiled") - buildSteps = flag.Bool("x", false, "Print the command as executing the builds") - buildRace = flag.Bool("race", false, "Enable data race detection (supported only on amd64)") - buildTags = flag.String("tags", "", "List of build tags to consider satisfied during the build") - buildLdFlags = flag.String("ldflags", "", "Arguments to pass on each go tool link invocation") - buildMode = flag.String("buildmode", "default", "Indicates which kind of object file to build") + buildVerbose = flag.Bool("v", false, "Print the names of packages as they are compiled") + buildSteps = flag.Bool("x", false, "Print the command as executing the builds") + buildRace = flag.Bool("race", false, "Enable data race detection (supported only on amd64)") + buildTags = flag.String("tags", "", "List of build tags to consider satisfied during the build") + buildLdFlags = flag.String("ldflags", "", "Arguments to pass on each go tool link invocation") + buildMode = flag.String("buildmode", "default", "Indicates which kind of object file to build") + buildTrimpath = flag.Bool("trimpath", false, "Indicates if trimpath should be applied to build") ) // BuildFlags is a simple collection of flags to fine tune a build. type BuildFlags struct { - Verbose bool // Print the names of packages as they are compiled - Steps bool // Print the command as executing the builds - Race bool // Enable data race detection (supported only on amd64) - Tags string // List of build tags to consider satisfied during the build - LdFlags string // Arguments to pass on each go tool link invocation - Mode string // Indicates which kind of object file to build + Verbose bool // Print the names of packages as they are compiled + Steps bool // Print the command as executing the builds + Race bool // Enable data race detection (supported only on amd64) + Tags string // List of build tags to consider satisfied during the build + LdFlags string // Arguments to pass on each go tool link invocation + Mode string // Indicates which kind of object file to build + Trimpath bool // Indicates if trimpath should be applied to build } func main() { @@ -174,12 +177,13 @@ func main() { Targets: strings.Split(*targets, ","), } flags := &BuildFlags{ - Verbose: *buildVerbose, - Steps: *buildSteps, - Race: *buildRace, - Tags: *buildTags, - LdFlags: *buildLdFlags, - Mode: *buildMode, + Verbose: *buildVerbose, + Steps: *buildSteps, + Race: *buildRace, + Tags: *buildTags, + LdFlags: *buildLdFlags, + Mode: *buildMode, + Trimpath: *buildTrimpath, } folder, err := os.Getwd() if err != nil { @@ -219,7 +223,23 @@ func checkDockerImage(image string) (bool, error) { if err != nil { return false, err } + return compareOutAndImage(out, image) +} + +// compare output of docker images and image name +func compareOutAndImage(out []byte, image string) (bool, error) { + + if strings.Contains(image, ":") { + // get repository and tag + res := strings.SplitN(image, ":", 2) + r, t := res[0], res[1] + match, _ := regexp.Match(fmt.Sprintf(`%s\s+%s`, r, t), out) + return match, nil + } + + // default find repository without tag return bytes.Contains(out, []byte(image)), nil + } // Pulls an image from the docker registry. @@ -290,10 +310,16 @@ func compile(image string, config *ConfigFlags, flags *BuildFlags, folder string // Assemble and run the cross compilation command fmt.Printf("Cross compiling %s...\n", config.Repository) + // Alter paths so they work for Windows + // Does not affect Linux paths + re := regexp.MustCompile("([A-Z]):") + folder_w := filepath.ToSlash(re.ReplaceAllString(folder, "/$1")) + depsCache_w := filepath.ToSlash(re.ReplaceAllString(depsCache, "/$1")) + args := []string{ "run", "--rm", - "-v", folder + ":/build", - "-v", depsCache + ":/deps-cache:ro", + "-v", folder_w + ":/build", + "-v", depsCache_w + ":/deps-cache:ro", "-e", "REPO_REMOTE=" + config.Remote, "-e", "REPO_BRANCH=" + config.Branch, "-e", "PACK=" + config.Package, @@ -306,7 +332,9 @@ func compile(image string, config *ConfigFlags, flags *BuildFlags, folder string "-e", fmt.Sprintf("FLAG_TAGS=%s", flags.Tags), "-e", fmt.Sprintf("FLAG_LDFLAGS=%s", flags.LdFlags), "-e", fmt.Sprintf("FLAG_BUILDMODE=%s", flags.Mode), + "-e", fmt.Sprintf("FLAG_TRIMPATH=%v", flags.Trimpath), "-e", "TARGETS=" + strings.Replace(strings.Join(config.Targets, " "), "*", ".", -1), + "-e", fmt.Sprintf("GOPROXY=%s", os.Getenv("GOPROXY")), } if usesModules { args = append(args, []string{"-e", "GO111MODULE=on"}...) @@ -363,6 +391,7 @@ func compileContained(config *ConfigFlags, flags *BuildFlags, folder string) err fmt.Sprintf("FLAG_TAGS=%s", flags.Tags), fmt.Sprintf("FLAG_LDFLAGS=%s", flags.LdFlags), fmt.Sprintf("FLAG_BUILDMODE=%s", flags.Mode), + fmt.Sprintf("FLAG_TRIMPATH=%v", flags.Trimpath), "TARGETS=" + strings.Replace(strings.Join(config.Targets, " "), "*", ".", -1), } if local {