cmd: set proper GOBIN

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
This commit is contained in:
Li Zhijian
2021-02-10 14:06:29 +08:00
parent 054f18701a
commit abae65d8f1
2 changed files with 8 additions and 2 deletions

View File

@@ -3,7 +3,10 @@
.PHONY: generate license fix vet fmt test build tidy clean
GOBIN := $(shell go env GOPATH)/bin
GOBIN = $(shell go env GOBIN)
ifeq ($(GOBIN),)
GOBIN = $(shell go env GOPATH)/bin
endif
$(GOBIN)/addlicense:
go get github.com/google/addlicense

View File

@@ -1,4 +1,7 @@
MYGOBIN := $(shell go env GOPATH)/bin
MYGOBIN = $(shell go env GOBIN)
ifeq ($(MYGOBIN),)
MYGOBIN = $(shell go env GOPATH)/bin
endif
$(MYGOBIN)/gorepomod: usage.go
go install .