mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 09:41:57 +00:00
Build experimental stuff in a container too
This commit is contained in:
@@ -2,12 +2,19 @@
|
||||
|
||||
DIRS=$(shell find . -maxdepth 2 -name *.go -printf "%h\n" | uniq)
|
||||
TARGETS=$(join $(patsubst %,%/,$(DIRS)),$(DIRS))
|
||||
BUILD_IN_CONTAINER=true
|
||||
RM=--rm
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
ifeq ($(BUILD_IN_CONTAINER),true)
|
||||
$(TARGETS):
|
||||
$(SUDO) docker run -ti $(RM) -v $(shell pwd)/../:/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
|
||||
weaveworks/scope-backend-build -C experimental $@
|
||||
else
|
||||
$(TARGETS):
|
||||
go get -tags netgo ./$(@D)
|
||||
go build -ldflags "-extldflags \"-static\"" -tags netgo -o $@ ./$(@D)
|
||||
endif
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
Reference in New Issue
Block a user