From 89365877bac22c1aec1359df59baf0c3ca588b0a Mon Sep 17 00:00:00 2001 From: Akhil Kumar P <36399231+akhilkumarpilli@users.noreply.github.com> Date: Tue, 19 Jan 2021 16:48:12 +0530 Subject: [PATCH] Use env variable for gopath in Makefile (#380) --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4ea8d0b8acf..7c4e3470062 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,10 @@ COMMIT := $(shell git log -1 --format='%H') SDKCOMMIT := $(shell go list -m -u -f '{{.Version}}' github.com/cosmos/cosmos-sdk) GAIA_VERSION := main AKASH_VERSION := jack/update-sdk + +GOPATH := $(shell go env GOPATH) +GOBIN := $(GOPATH)/bin + all: ci-lint install ############################################################################### @@ -38,7 +42,7 @@ compile-clib: install: go.sum @echo "installing rly binary..." - @go build -mod=readonly $(BUILD_FLAGS) -o $${GOBIN-$${GOPATH-$$HOME/go}/bin}/rly main.go + @go build -mod=readonly $(BUILD_FLAGS) -o $(GOBIN)/rly main.go ############################################################################### # Tests / CI