From 342be3d0aa0116fc20862d4f6ee7ff1070837bc5 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 27 Aug 2018 14:45:57 -0700 Subject: [PATCH] Don't modify path or force gopath use --- Makefile | 6 ------ appveyor.yml | 1 + scripts/build.py | 4 +--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 4521c5d7..861395f9 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,6 @@ GOFILES ?= $(shell git ls-files '*.go') GOFMT ?= $(shell gofmt -l $(filter-out plugins/parsers/influx/machine.go, $(GOFILES))) BUILDFLAGS ?= -ifdef GOBIN -PATH := $(GOBIN):$(PATH) -else -PATH := $(subst :,/bin:,$(shell go env GOPATH))/bin:$(PATH) -endif - LDFLAGS := $(LDFLAGS) -X main.commit=$(COMMIT) -X main.branch=$(BRANCH) ifdef VERSION LDFLAGS += -X main.version=$(VERSION) diff --git a/appveyor.yml b/appveyor.yml index a1af84d6..f6b41081 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,6 +23,7 @@ install: - cd "%GOPATH%\src\github.com\golang\dep" - git checkout -q v0.5.0 - go install -ldflags="-X main.version=v0.5.0" ./cmd/dep + - set PATH=C:\gopath\bin;%PATH% - cd "%GOPATH%\src\github.com\influxdata\telegraf" - git config --system core.longpaths true - go version diff --git a/scripts/build.py b/scripts/build.py index 27f47f42..f79fd861 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -3,7 +3,6 @@ import sys import os import subprocess -import time from datetime import datetime import shutil import tempfile @@ -156,8 +155,7 @@ def go_get(branch, update=False, no_uncommitted=False): logging.error("There are uncommitted changes in the current directory.") return False logging.info("Retrieving dependencies with `dep`...") - run("{}/bin/dep ensure -v -vendor-only".format(os.environ.get("GOPATH", - os.path.expanduser("~/go")))) + run("dep ensure -v -vendor-only") return True def run_tests(race, parallel, timeout, no_vet):