Makefile: handle empty/default $GOPATH (#3333)

Use `$(CURDIR)` in place of `$(shell pwd)`. This saves a
fork+exec, is more readable, and is more idiomatic. The only case where
those should have different values is when someone's configured `$SHELL`
is badly broken, and I'd argue in that case `$(CURDIR)` is preferable.

Change-Id: I6a3abac1e2e197f5332825ffad2bbd3da1fc4700
This commit is contained in:
paul cannon 2019-10-22 18:44:13 +09:00 committed by Egon Elbre
parent 94cec7e3b0
commit 78000c0191

View File

@ -1,6 +1,7 @@
GO_VERSION ?= 1.13.3
GOOS ?= linux
GOARCH ?= amd64
GOPATH ?= $(shell go env GOPATH)
COMPOSE_PROJECT_NAME := ${TAG}-$(shell git rev-parse --abbrev-ref HEAD)
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD | sed "s!/!-!g")
ifeq (${BRANCH_NAME},master)
@ -372,7 +373,7 @@ diagrams-graphml:
update-satellite-config-lock: ## Update the satellite config lock file
@docker run -ti --rm \
-v ${GOPATH}/pkg/mod:/go/pkg/mod \
-v $(shell pwd):/storj \
-v ${CURDIR}:/storj \
-v $(shell go env GOCACHE):/go-cache \
-e "GOCACHE=/go-cache" \
-u root:root \