summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2017-02-26 16:27:45 +0100
committerThomas Boerger <thomas@webhippie.de>2017-02-26 16:27:45 +0100
commitab462fb95f7fec5df732a1c60bffe80d86c3b213 (patch)
treec25c146d0e0c5fc5789f8b9e2acea596a046641d /Makefile
parenta30797425f6a1ef4b6ccb348ec486819a9add08c (diff)
downloadgitea-ab462fb95f7fec5df732a1c60bffe80d86c3b213.tar.gz
gitea-ab462fb95f7fec5df732a1c60bffe80d86c3b213.zip
Makefile: Use hash over which (#1069)
`hash` is a much faster shell-builtin alternative to `which`.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 93409686e6..212aa4fdc1 100644
--- a/Makefile
+++ b/Makefile
@@ -47,21 +47,21 @@ vet:
.PHONY: generate
generate:
- @which go-bindata > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
+ @hash 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 2>&1; if [ $$? -ne 0 ]; then \
+ @hash 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 2>&1; if [ $$? -ne 0 ]; then \
+ @hash 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;
@@ -105,7 +105,7 @@ release-dirs:
.PHONY: release-build
release-build:
- @which xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
+ @hash 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) .