Skip to content

Add make install target for hooksctl#11

Open
aaronbrethorst wants to merge 1 commit into
mainfrom
make-install-target
Open

Add make install target for hooksctl#11
aaronbrethorst wants to merge 1 commit into
mainfrom
make-install-target

Conversation

@aaronbrethorst
Copy link
Copy Markdown
Member

@aaronbrethorst aaronbrethorst commented May 24, 2026

Summary

  • Add a make install target that runs go install ./cmd/hooksctl, installing the operator CLI onto the developer's PATH.
  • Chose go install over copying to /usr/local/bin for portability across all developers: no sudo, no hardcoded path, cross-platform, and it honors each developer's GOBIN (overridable via GOBIN=/some/dir make install).
  • Document make install in CLAUDE.md's common-commands list.

Test plan

  • make install installs hooksctl into GOBIN; the installed binary runs (hooksctl --help, hooksctl whoami).
  • GOBIN=/tmp/... make install redirects the install to the override directory.
  • go install -n ./cmd/hooksctl dry-run resolves to a hooksctl binary in GOBIN.

Review notes

  • make build builds both hooks and hooksctl, but make install intentionally installs only hooksctl (the dev/operator CLI developers want on PATH; the server runs via make run/make dev or Docker). CLAUDE.md's line states only hooksctl is installed, so this is documented rather than a surprise.

Summary by CodeRabbit

  • New Features

    • Added installation support for command-line tooling via the build system, enabling streamlined setup for local development environments.
  • Documentation

    • Updated documentation to explain the new installation workflow and how to use it within the development environment.

Review Change Stack

Runs `go install ./cmd/hooksctl` so it installs into each developer's
GOBIN (or $GOPATH/bin) — portable across developers (no sudo, no
hardcoded path, cross-platform) rather than copying to /usr/local/bin.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 452d7e2e-01fb-41ff-9786-389279c66676

📥 Commits

Reviewing files that changed from the base of the PR and between f560895 and 18aa4f2.

📒 Files selected for processing (2)
  • CLAUDE.md
  • Makefile

📝 Walkthrough

Walkthrough

The pull request adds a make install target to the Makefile that installs ./cmd/hooksctl via $(GO) install, along with corresponding .PHONY configuration. The CLAUDE.md documentation is updated to include this new make install command in the common workflow steps.

Changes

Install target and documentation

Layer / File(s) Summary
Add install target and documentation
Makefile, CLAUDE.md
Makefile adds an install target that installs the hooksctl command using $(GO) install ./cmd/hooksctl, updates the .PHONY list accordingly, and CLAUDE.md documents this new common command with installation destination information.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a make install target for hooksctl.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch make-install-target

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant