Skip to content

Commit 6c0fef4

Browse files
committed
chore(docs): add Makefile targets to AGENTS.md
Signed-off-by: Marc Nuri <marc@marcnuri.com>
1 parent 1b3b7c4 commit 6c0fef4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

AGENTS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ cd native
2323
go build -buildmode=c-shared -o out/helm-darwin-10.12-amd64.dylib .
2424
# (or the appropriate target for your platform)
2525
cd ..
26+
27+
# Alternatively, use the Makefile for simplified builds
28+
make build-current-platform # Builds native + Java for current platform only
2629
```
2730

2831
### Build Commands
@@ -39,6 +42,13 @@ cd ..
3942

4043
# Build with javadoc and sources
4144
./mvnw clean package
45+
46+
# Using Makefile targets
47+
make build-java # Maven build only
48+
make build-native # Build native library for current platform
49+
make build-native-cross-platform # Build for all platforms (requires xgo)
50+
make build-all # Cross-platform natives + Java build
51+
make clean # Clean all build artifacts
4252
```
4353

4454
### Testing
@@ -57,6 +67,11 @@ cd ..
5767

5868
# Run a specific test method
5969
./mvnw test -pl helm-java -Dtest=HelmInstallTest#withName
70+
71+
# Run Go tests only
72+
make test-go
73+
# Or directly:
74+
cd native && go clean -testcache && go test ./...
6075
```
6176

6277
**NEVER CANCEL** tests that involve Kubernetes operations - they may leave resources in an inconsistent state.
@@ -228,6 +243,9 @@ go test ./... # Run Go tests first
228243
go build -buildmode=c-shared -o out/helm-darwin-10.12-arm64.dylib .
229244
cd ..
230245
./mvnw test -pl helm-java
246+
247+
# Or use Makefile (auto-detects platform):
248+
make build-native
231249
```
232250

233251
### Debugging Native Calls
@@ -248,6 +266,12 @@ Ensure the native binaries exist in `native/out/` before running Maven. The enfo
248266
- `helm-linux-arm64.so`
249267
- `helm-windows-4.0-amd64.dll`
250268

269+
To build only for your current platform (bypassing the enforcer check):
270+
```bash
271+
make build-current-platform
272+
# This sets -Denforcer.skipRules=requireFilesExist automatically
273+
```
274+
251275
### Tests fail with "KUBECONFIG" errors
252276

253277
The Surefire plugin is configured with `KUBECONFIG=/dev/null` to prevent tests from using your local kubeconfig. This is intentional.

0 commit comments

Comments
 (0)