mirror of
https://github.com/wahyd4/telegraf.git
synced 2026-08-21 02:26:08 +10:00
Don't modify path or force gopath use
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user