diff --git a/CLAUDE.md b/CLAUDE.md index afc58fd..1801247 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,6 +15,7 @@ There are two binaries: ```sh make build # builds ./bin/hooks and ./bin/hooksctl +make install # go install ./cmd/hooksctl (into $GOBIN, else $GOPATH/bin) make test # go test ./... make lint # golangci-lint run ./... (config in .golangci.yml) make tidy # go mod tidy diff --git a/Makefile b/Makefile index 6125e44..cafe92b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build test lint run dev tidy sqlc sqlc-diff docker-build docker-run docker-test +.PHONY: build install test lint run dev tidy sqlc sqlc-diff docker-build docker-run docker-test GO ?= go HOOKS_BIN := ./bin/hooks @@ -13,6 +13,11 @@ build: $(GO) build -o $(HOOKS_BIN) ./cmd/hooks $(GO) build -o $(HOOKSCTL_BIN) ./cmd/hooksctl +# Installs hooksctl into $GOBIN if set, else $GOPATH/bin (default ~/go/bin). +# Override the destination with `GOBIN=/some/dir make install`. +install: + $(GO) install ./cmd/hooksctl + test: $(GO) test ./...