Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes building scope outside of a container. #901

Merged
merged 2 commits into from
Feb 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUNSVINIT=vendor/runsvinit/runsvinit
RM=--rm
RUN_FLAGS=-ti
BUILD_IN_CONTAINER=true
GO ?= env GO15VENDOREXPERIMENT=1 go
GO_BUILD_INSTALL_DEPS=-i
GO_BUILD_FLAGS=$(GO_BUILD_INSTALL_DEPS) -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION)" -tags netgo

Expand Down Expand Up @@ -55,7 +56,7 @@ $(SCOPE_EXE) $(RUNSVINIT) lint tests shell: $(SCOPE_BACKEND_BUILD_UPTODATE)
else

$(SCOPE_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE)
time go build $(GO_BUILD_FLAGS) -o $@ ./$(@D)
time $(GO) build $(GO_BUILD_FLAGS) -o $@ ./$(@D)
@strings $@ | grep cgo_stub\\\.go >/dev/null || { \
rm $@; \
echo "\nYour go standard library was built without the 'netgo' build tag."; \
Expand All @@ -66,7 +67,7 @@ $(SCOPE_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE)
}

$(RUNSVINIT):
time go build $(GO_BUILD_FLAGS) -o $@ ./$(@D)
time $(GO) build $(GO_BUILD_FLAGS) -o $@ ./$(@D)

shell:
/bin/bash
Expand Down Expand Up @@ -119,13 +120,13 @@ $(SCOPE_BACKEND_BUILD_UPTODATE): backend/*
touch $@

clean:
go clean ./...
$(GO) clean ./...
$(SUDO) docker rmi $(SCOPE_UI_BUILD_IMAGE) $(SCOPE_BACKEND_BUILD_IMAGE) >/dev/null 2>&1 || true
rm -rf $(SCOPE_EXPORT) $(SCOPE_UI_BUILD_UPTODATE) $(SCOPE_BACKEND_BUILD_UPTODATE) \
$(SCOPE_EXE) $(RUNSVINIT) prog/static.go client/build/app.js docker/weave .pkg

deps:
go get -u -f -tags netgo \
$(GO) get -u -f -tags netgo \
github.com/FiloSottile/gvt \
github.com/mattn/goveralls \
github.com/mjibson/esc \
Expand Down