ensure make dev target puts the newly constructed binary onto the PATH (#12318)

This restores the prior behavior of make dev and ensures that tests
using the sdk package (like the api package) will correctly locate the
consul binary under test.

Also ensure the constructed consul binary is present on the path for sdk-based tests.
pull/12322/head
R.B. Boyer 3 years ago committed by GitHub
parent 0e730328bd
commit 49431c7532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,6 +18,8 @@ GOTAGS ?=
GOPATH=$(shell go env GOPATH) GOPATH=$(shell go env GOPATH)
MAIN_GOPATH=$(shell go env GOPATH | cut -d: -f1) MAIN_GOPATH=$(shell go env GOPATH | cut -d: -f1)
export PATH := $(PWD)/bin:$(PATH)
ASSETFS_PATH?=agent/uiserver/bindata_assetfs.go ASSETFS_PATH?=agent/uiserver/bindata_assetfs.go
# Get the git commit # Get the git commit
GIT_COMMIT?=$(shell git rev-parse --short HEAD) GIT_COMMIT?=$(shell git rev-parse --short HEAD)
@ -145,7 +147,8 @@ dev: dev-build
dev-build: dev-build:
mkdir -p bin mkdir -p bin
CGO_ENABLED=0 go build -o ./bin -ldflags "$(GOLDFLAGS)" -tags "$(GOTAGS)" CGO_ENABLED=0 go install -ldflags "$(GOLDFLAGS)" -tags "$(GOTAGS)"
cp -f ${MAIN_GOPATH}/bin/consul ./bin/consul
dev-docker: linux dev-docker: linux
@echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)" @echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)"

Loading…
Cancel
Save