From db62f8cff1528528dbaf941ab542bf8936910ba5 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Thu, 25 Feb 2016 09:42:42 +0000 Subject: [PATCH] Invoke Go consistently and remove GO15VENDOREXPERIMENT from container --- Makefile | 2 +- backend/Dockerfile | 1 - experimental/Makefile | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5333b35f36..1530305876 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ shell: $(SCOPE_BACKEND_BUILD_UPTODATE) /bin/bash tests: $(SCOPE_BACKEND_BUILD_UPTODATE) - ./tools/test -no-go-get + env -u GOGC $(GO_ENVS) ./tools/test -no-go-get lint: $(SCOPE_BACKEND_BUILD_UPTODATE) ./tools/lint . diff --git a/backend/Dockerfile b/backend/Dockerfile index 5db434d54c..1bfd155aec 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,4 @@ FROM golang:1.5.3 -ENV GO15VENDOREXPERIMENT 1 RUN apt-get update && apt-get install -y libpcap-dev python-requests time RUN go clean -i net && go install -tags netgo std && go install -race -tags netgo std RUN go get -tags netgo \ diff --git a/experimental/Makefile b/experimental/Makefile index c489209d98..a970ace263 100644 --- a/experimental/Makefile +++ b/experimental/Makefile @@ -4,7 +4,7 @@ DIRS=$(shell find . -maxdepth 2 -name *.go | xargs -n1 dirname | sort -u) TARGETS=$(join $(patsubst %,%/,$(DIRS)),$(patsubst ./%,%,$(DIRS))) BUILD_IN_CONTAINER=true RM=--rm - +GO ?= env GO15VENDOREXPERIMENT=1 GOGC=off go all: $(TARGETS) ifeq ($(BUILD_IN_CONTAINER),true) @@ -13,11 +13,11 @@ $(TARGETS): weaveworks/scope-backend-build -C experimental $@ else $(TARGETS): - go build -ldflags "-extldflags \"-static\"" -tags netgo -o $@ ./$(@D) + $(GO) build -ldflags "-extldflags \"-static\"" -tags netgo -o $@ ./$(@D) endif test: - go test ./... + $(GO) test ./... clean: - go clean ./... + $(GO) clean ./...