mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-15 19:41:02 +00:00
Build experimental stuff in a container too
This commit is contained in:
@@ -7,5 +7,5 @@ set -eux
|
||||
|
||||
cd $GOPATH/src/github.com/weaveworks/scope
|
||||
rm $1 2>/dev/null || true
|
||||
make BUILD_IN_CONTAINER=false $1
|
||||
make BUILD_IN_CONTAINER=false $@
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ test:
|
||||
- cd $SRCDIR; rm -f app/scope-app probe/scope-probe; GOARCH=arm make RM= app/scope-app probe/scope-probe
|
||||
- cd $SRCDIR; rm -f app/scope-app probe/scope-probe; GOOS=darwin make RM= app/scope-app probe/scope-probe
|
||||
- cd $SRCDIR; rm -f app/scope-app probe/scope-probe; make RM=
|
||||
- cd $SRCDIR/experimental; make
|
||||
- cd $SRCDIR/experimental; make RM=
|
||||
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh setup)
|
||||
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; eval $(./gce.sh hosts); ./setup.sh)
|
||||
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; eval $(./gce.sh hosts); ./run_all.sh):
|
||||
|
||||
@@ -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