Don't modify path or force gopath use

This commit is contained in:
Daniel Nelson
2018-08-29 18:28:02 -07:00
parent 61e5d500ba
commit 342be3d0aa
3 changed files with 2 additions and 9 deletions
-6
View File
@@ -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)
+1
View File
@@ -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
+1 -3
View File
@@ -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):