aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-03-20 01:00:45 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-03-20 01:00:45 +0800
commitb1917ac9a3cf4716460bd53a11db40384103e5e2 (patch)
treef923580e40eac5fbd52c8d2f7ddd7b9103171527 /build
parent1203c6a237cb87b78ec495772cecb178200499ce (diff)
downloadgo-tangerine-b1917ac9a3cf4716460bd53a11db40384103e5e2.tar.gz
go-tangerine-b1917ac9a3cf4716460bd53a11db40384103e5e2.tar.zst
go-tangerine-b1917ac9a3cf4716460bd53a11db40384103e5e2.zip
build: add GOBIN to PATH for gomobile (#16344)
* build: add GOBIN to PATH for gomobile * build: install gobind alongside gomobile
Diffstat (limited to 'build')
-rw-r--r--build/ci.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/build/ci.go b/build/ci.go
index 36b0e82ef..1881a596e 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -726,7 +726,7 @@ func doAndroidArchive(cmdline []string) {
log.Fatal("Please ensure ANDROID_NDK points to your Android NDK")
}
// Build the Android archive and Maven resources
- build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile"))
+ build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
build.MustRun(gomobileTool("init", "--ndk", os.Getenv("ANDROID_NDK")))
build.MustRun(gomobileTool("bind", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
@@ -777,9 +777,10 @@ func gomobileTool(subcmd string, args ...string) *exec.Cmd {
cmd.Args = append(cmd.Args, args...)
cmd.Env = []string{
"GOPATH=" + build.GOPATH(),
+ "PATH=" + GOBIN + string(os.PathListSeparator) + os.Getenv("PATH"),
}
for _, e := range os.Environ() {
- if strings.HasPrefix(e, "GOPATH=") {
+ if strings.HasPrefix(e, "GOPATH=") || strings.HasPrefix(e, "PATH=") {
continue
}
cmd.Env = append(cmd.Env, e)
@@ -846,7 +847,7 @@ func doXCodeFramework(cmdline []string) {
env := build.Env()
// Build the iOS XCode framework
- build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile"))
+ build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
build.MustRun(gomobileTool("init"))
bind := gomobileTool("bind", "--target", "ios", "--tags", "ios", "-v", "github.com/ethereum/go-ethereum/mobile")