From 96acdf2961c9d78f61c30c19b55fbc9bb6ff2eed Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Wed, 1 Feb 2017 15:12:04 -0300 Subject: [PATCH] Added GOPATH/bin to the path in build script Also fixed hardcoded tool name for MongoDB tools --- src/go/pt-mongodb-query-digest/main.go | 2 +- src/go/pt-mongodb-summary/main.go | 2 +- util/build-packages | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/go/pt-mongodb-query-digest/main.go b/src/go/pt-mongodb-query-digest/main.go index 76ed3376..720cb21a 100644 --- a/src/go/pt-mongodb-query-digest/main.go +++ b/src/go/pt-mongodb-query-digest/main.go @@ -138,7 +138,7 @@ func main() { log.SetLevel(logLevel) if opts.Version { - fmt.Println("pt-mongodb-summary") + fmt.Println(TOOLNAME) fmt.Printf("Version %s\n", Version) fmt.Printf("Build: %s using %s\n", Build, GoVersion) return diff --git a/src/go/pt-mongodb-summary/main.go b/src/go/pt-mongodb-summary/main.go index e8d44ae0..1d358524 100644 --- a/src/go/pt-mongodb-summary/main.go +++ b/src/go/pt-mongodb-summary/main.go @@ -172,7 +172,7 @@ func main() { } if opts.Version { - fmt.Println("pt-mongodb-summary") + fmt.Println(TOOLNAME) fmt.Printf("Version %s\n", Version) fmt.Printf("Build: %s using %s\n", Build, GoVersion) return diff --git a/util/build-packages b/util/build-packages index 44f6e381..8fea7755 100755 --- a/util/build-packages +++ b/util/build-packages @@ -426,7 +426,8 @@ build_go_binaries() { TOOLKIT_DIR="${PERCONA_DIR}/percona-toolkit" GO_TOOLS_DIR="${TOOLKIT_DIR}/src/go" CUR_DIR=$(pwd) - UNLINK=0 + UNLINK=0 + export PATH=${GOPATH}/bin:${PATH} echo "GOPATH: ${GOPATH}" echo "Github directory: ${GITHUB_DIR}"