Skip to content

Commit

Permalink
Makefile: Also redirect stderr on which calls (go-gitea#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind authored and lunny committed Feb 26, 2017
1 parent 35548a9 commit 5bd22a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ vet:

.PHONY: generate
generate:
@which go-bindata > /dev/null; if [ $$? -ne 0 ]; then \
@which go-bindata > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/jteeuwen/go-bindata/...; \
fi
go generate $(PACKAGES)

.PHONY: errcheck
errcheck:
@which errcheck > /dev/null; if [ $$? -ne 0 ]; then \
@which errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/kisielk/errcheck; \
fi
errcheck $(PACKAGES)

.PHONY: lint
lint:
@which golint > /dev/null; if [ $$? -ne 0 ]; then \
@which golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/golang/lint/golint; \
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
Expand Down Expand Up @@ -105,7 +105,7 @@ release-dirs:

.PHONY: release-build
release-build:
@which xgo > /dev/null; if [ $$? -ne 0 ]; then \
@which xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go get -u github.com/karalabe/xgo; \
fi
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets '$(TARGETS)' -out $(EXECUTABLE)-$(VERSION) .
Expand Down

0 comments on commit 5bd22a2

Please sign in to comment.