Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix(Makefiles): silence static binary check
Browse files Browse the repository at this point in the history
The check-static-binary Makefile function echoes itself to
stdout with every invocation. This silences it unless it actually
finds an error.
  • Loading branch information
mboersma committed Jul 17, 2015
1 parent 352575c commit 5f238dd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion builder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ BINARY_DEST_DIR := rootfs/usr/bin
build: check-docker
for i in $(BINARIES); do \
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix cgo -ldflags '-s' -o $(BINARY_DEST_DIR)/$$i src/$$i.go || exit 1; \
$(call check-static-binary,$(BINARY_DEST_DIR)/$$i) \
done
@for i in $(BINARIES); do \
$(call check-static-binary,$(BINARY_DEST_DIR)/$$i); \
done
docker build -t $(IMAGE) rootfs

Expand Down
2 changes: 1 addition & 1 deletion cache/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BINARY_DEST_DIR = image/bin

build: check-docker
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix cgo -ldflags '-s' -o $(BINARY_DEST_DIR)/boot main.go || exit 1
$(call check-static-binary,$(BINARY_DEST_DIR)/boot)
@$(call check-static-binary,$(BINARY_DEST_DIR)/boot)
docker build -t $(IMAGE) image

clean: check-docker check-registry
Expand Down
2 changes: 1 addition & 1 deletion logger/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BINARY_DEST_DIR = image/bin

build: check-docker
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix cgo -ldflags '-s' -o $(BINARY_DEST_DIR)/logger github.com/deis/deis/logger || exit 1
$(call check-static-binary,$(BINARY_DEST_DIR)/logger)
@$(call check-static-binary,$(BINARY_DEST_DIR)/logger)
docker build -t $(IMAGE) image

clean: check-docker check-registry
Expand Down
2 changes: 1 addition & 1 deletion logspout/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DEV_DOCKER_IMAGE := $(REGISTRY)$(RELEASE_IMAGE)

build: check-docker
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix cgo -ldflags '-s' -o image/logspout
$(call check-static-binary,image/logspout)
@$(call check-static-binary,image/logspout)
docker build -t $(RELEASE_IMAGE) image

clean:
Expand Down
2 changes: 1 addition & 1 deletion publisher/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BINARY_DEST_DIR = image/bin

build: check-docker
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix cgo -ldflags '-s' -o $(BINARY_DEST_DIR)/publisher github.com/deis/deis/publisher || exit 1
$(call check-static-binary,$(BINARY_DEST_DIR)/publisher)
@$(call check-static-binary,$(BINARY_DEST_DIR)/publisher)
docker build -t $(RELEASE_IMAGE) image

clean: check-docker check-registry
Expand Down
2 changes: 1 addition & 1 deletion router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build: check-docker
docker build -t $(BUILD_IMAGE) .
docker cp `docker run -d $(BUILD_IMAGE) /bin/bash`:/nginx.tgz image/
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix -v -ldflags '-s' -o $(BINARY_DEST_DIR)/boot boot.go || exit 1
$(call check-static-binary,image/bin/boot)
@$(call check-static-binary,image/bin/boot)
docker build -t $(IMAGE) image
rm image/nginx.tgz
rm image/bin/boot
Expand Down

0 comments on commit 5f238dd

Please sign in to comment.