Invoke Go consistently and remove GO15VENDOREXPERIMENT from container

This commit is contained in:
Alfonso Acosta
2016-02-25 09:42:42 +00:00
committed by Simon Howe
parent ab6b00adf9
commit 783297672c
3 changed files with 5 additions and 6 deletions

View File

@@ -94,7 +94,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 .

View File

@@ -1,5 +1,4 @@
FROM golang:1.6.0
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 \

View File

@@ -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 ./...
env -u GOGC $(GO) test ./...
clean:
go clean ./...
$(GO) clean ./...