diff --git a/Makefile b/Makefile index c345c5fed0..27be0f94b6 100644 --- a/Makefile +++ b/Makefile @@ -163,8 +163,15 @@ prep: check-go-version @GOARCH= GOOS= $(GO_CMD) generate $(MAIN_PACKAGES) @GOARCH= GOOS= cd api && $(GO_CMD) generate $(API_PACKAGES) @GOARCH= GOOS= cd sdk && $(GO_CMD) generate $(SDK_PACKAGES) + +# Git doesn't allow us to store shared hooks in .git. Instead, we make sure they're up-to-date +# whenever a make target is invoked. +.PHONY: hooks +hooks: @if [ -d .git/hooks ]; then cp .hooks/* .git/hooks/; fi +-include hooks # Make sure they're always up-to-date + # bootstrap the build by generating any necessary code and downloading additional tools that may # be used by devs. bootstrap: prep tools @@ -378,4 +385,4 @@ ci-copywriteheaders: .PHONY: all-packages all-packages: - @echo $(ALL_PACKAGES) | tr ' ' '\n' + @echo $(ALL_PACKAGES) | tr ' ' '\n'