Don't -i for different architectures.

This commit is contained in:
Tom Wilkie
2016-01-04 16:27:53 +00:00
parent d6052973af
commit 696a50fd27
2 changed files with 5 additions and 4 deletions

View File

@@ -18,7 +18,8 @@ RUNSVINIT=vendor/runsvinit/runsvinit
RM=--rm
RUN_FLAGS=-ti
BUILD_IN_CONTAINER=true
GO_BUILD_FLAGS=-i -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION)" -tags netgo
GO_BUILD_INSTALL_DEPS=-i
GO_BUILD_FLAGS=$(GO_BUILD_INSTALL_DEPS) -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION)" -tags netgo
all: $(SCOPE_EXPORT)
@@ -44,12 +45,12 @@ $(SCOPE_EXE) $(RUNSVINIT): $(SCOPE_BACKEND_BUILD_UPTODATE)
@mkdir -p $(shell pwd)/pkg
$(SUDO) docker run $(RM) $(RUN_FLAGS) -v $(shell pwd):/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
-v $(shell pwd)/pkg:/go/pkg \
$(SCOPE_BACKEND_BUILD_IMAGE) SCOPE_VERSION=$(SCOPE_VERSION) $@
$(SCOPE_BACKEND_BUILD_IMAGE) SCOPE_VERSION=$(SCOPE_VERSION) GO_BUILD_INSTALL_DEPS=$(GO_BUILD_INSTALL_DEPS) $@
shell:
$(SUDO) docker run $(RM) $(RUN_FLAGS) -v $(shell pwd):/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
-v $(shell pwd)/pkg:/go/pkg \
$(SCOPE_BACKEND_BUILD_IMAGE) SCOPE_VERSION=$(SCOPE_VERSION) $@
$(SCOPE_BACKEND_BUILD_IMAGE) SCOPE_VERSION=$(SCOPE_VERSION) GO_BUILD_INSTALL_DEPS=$(GO_BUILD_INSTALL_DEPS) $@
else
$(SCOPE_EXE):
time go build $(GO_BUILD_FLAGS) -o $@ ./$(@D)

View File

@@ -41,7 +41,7 @@ test:
parallel: true
- cd $SRCDIR; make RM= static:
parallel: true
- cd $SRCDIR; rm -f prog/scope; if [ "$CIRCLE_NODE_INDEX" = "0" ]; then GOARCH=arm make RM= prog/scope; else GOOS=darwin make RM= prog/scope; fi:
- cd $SRCDIR; rm -f prog/scope; if [ "$CIRCLE_NODE_INDEX" = "0" ]; then GOARCH=arm make GO_BUILD_INSTALL_DEPS= RM= prog/scope; else GOOS=darwin make GO_BUILD_INSTALL_DEPS= RM= prog/scope; fi:
parallel: true
- cd $SRCDIR; rm -f prog/scope; make RM=:
parallel: true