mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-21 22:36:39 +00:00
Invoke Go consistently and remove GO15VENDOREXPERIMENT from container
This commit is contained in:
committed by
Simon Howe
parent
ab6b00adf9
commit
783297672c
2
Makefile
2
Makefile
@@ -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 .
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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 ./...
|
||||
|
||||
Reference in New Issue
Block a user