Skip to content

Commit

Permalink
Merge pull request #614 from weaveworks/612-release-test
Browse files Browse the repository at this point in the history
Release script should use make tests to run tests; also fix build warning.
  • Loading branch information
tomwilkie committed Nov 3, 2015
2 parents 8f2dc64 + 43f6cf7 commit 29c2f82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ $(APP_EXE) $(PROBE_EXE) $(RUNSVINIT): $(SCOPE_BACKEND_BUILD_UPTODATE)
$(SUDO) docker run $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope -e GOARCH -e GOOS \
$(SCOPE_BACKEND_BUILD_IMAGE) SCOPE_VERSION=$(SCOPE_VERSION) $@
else
$(APP_EXE) $(PROBE_EXE):
go build -ldflags "-extldflags \"-static\" -X main.version $(SCOPE_VERSION)" -tags netgo -o $@ ./$(@D)
$(APP_EXE) $(PROBE_EXE): $(SCOPE_BACKEND_BUILD_UPTODATE)
go build -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION)" -tags netgo -o $@ ./$(@D)
@strings $@ | grep cgo_stub\\\.go >/dev/null || { \
rm $@; \
echo "\nYour go standard library was built without the 'netgo' build tag."; \
Expand Down Expand Up @@ -106,8 +106,7 @@ clean:
ifeq ($(BUILD_IN_CONTAINER),true)
tests:
$(SUDO) docker run $(RM) -v $(shell pwd):/go/src/github.com/weaveworks/scope \
-e GOARCH -e GOOS -e CIRCLECI --entrypoint=/bin/sh $(SCOPE_BACKEND_BUILD_IMAGE) -c \
"cd /go/src/github.com/weaveworks/scope && ./tools/test -no-go-get"
-e GOARCH -e GOOS -e CIRCLECI $(SCOPE_BACKEND_BUILD_IMAGE) tests
else
tests:
./tools/test -no-go-get
Expand Down
1 change: 0 additions & 1 deletion backend/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ set -eux
# -v $(pwd):/go/src/github.com/weaveworks/scope

cd $GOPATH/src/github.com/weaveworks/scope
rm $1 2>/dev/null || true
make BUILD_IN_CONTAINER=false $@

2 changes: 1 addition & 1 deletion bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ build() {
sed -i "/SCRIPT_VERSION=/ c\SCRIPT_VERSION=\"$VERSION\"" ./scope
make SUDO=$SUDO SCOPE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER

if $(go list -e -f {{.Dir}} github.com/weaveworks/tools)/test; then
if make tests; then
echo -e '\u2713 Tests pass'
else
echo -e "\u2757 Tests failed, probably best not publish this one" >&2
Expand Down

0 comments on commit 29c2f82

Please sign in to comment.