You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(build): align Makefile with project conventions (#389)
* chore(build): align Makefile with project conventions
Restructure the Makefile to follow the same conventions used in
kubernetes-mcp-server, podman-mcp-server, and com.marcnuri.automated-tasks:
- Add suva.sh-style `make help` with `##@` category banners
(Build / Test / Code Quality / Development / Release) and
per-target `##` doc strings.
- Switch `clean` to the `CLEAN_TARGETS +=` pattern so per-concern
modules can contribute their own paths.
- Split `release` into `build/release.mk`, auto-included via
`-include build/*.mk` so additional concerns (CI, packaging)
can land without churning the top-level Makefile.
- Wire `scripts/check-authors.sh` in as a first-class
`make check-authors` target so the linter is discoverable via
`make help`. `ARGS='--fix'` forwards flags to the script.
- Drop `build-native-wasi` — the WASI experiment is abandoned
per CLAUDE.md and slated for removal.
Update AGENTS.md so the layout table, build & test block, and
conventions reference `make help`, the `build/*.mk` includes,
and `make check-authors`.
* chore(build): keep .PHONY adjacent to build-current-platform rule
Place `.PHONY: build-current-platform` above the target-specific
`MAVEN_OPTIONS` assignment so `.PHONY` stays adjacent to the
target's main rule, matching the convention used elsewhere in the
file. Behavior is identical.
* chore(ci): wrap mvn deploy in make and extract free-disk-space action
Two cross-cutting cleanups across the build/release/snapshots workflows:
- Add `make maven-deploy` to `build/release.mk` wrapping
`mvn -Prelease clean deploy`, and replace the inline command in
release.yml and snapshots.yml. Single source of truth for the
Maven Central publish command.
- Extract the ~20-line apt-get disk-cleanup shell block (duplicated
in 3 workflows) to `.github/actions/free-disk-space` as a
composite action. CI-only sudo work belongs in a composite action,
not a Makefile target.
Update AGENTS.md so `make maven-deploy` is listed and the CI block
references both release.yml/snapshots.yml and the new composite
action.
* chore(build): polish review nits
- Move `build-current-platform`'s target-specific `MAVEN_OPTIONS`
assignment below the main rule so `.PHONY` is directly adjacent
to the rule line.
- Rename the composite action's inner step to `Purge preinstalled
software` so CI logs don't show `Free up disk space / Free up
disk space`.
|`Makefile`| Build/test/release entrypoints (see [Build & test](#build--test)). |
28
+
|`scripts/check-authors.sh`| Validates `@author` Javadoc tags (invoked via `make check-authors`). |
29
+
|`Makefile`, `build/*.mk`| Build/test/release entrypoints. Top-level Makefile auto-includes `build/*.mk` (e.g. `build/release.mk`). Run `make help` for the categorized target list. See [Build & test](#build--test). |
30
30
31
31
## Build & test
32
32
33
33
The Maven parent has `requireFilesExist` enforcer that needs all 5 native binaries in `native/out/`. Submodule `helm-java` and `lib/api` skip the rule, but a top-level `./mvnw install` will fail without them.
34
34
35
35
```bash
36
+
# Discover all targets (categorized: Build / Test / Code Quality / Development / Release)
37
+
make help
38
+
36
39
# Local dev (current platform only — skips the cross-platform enforcer check)
37
40
make build-current-platform # = build-native + mvn clean verify with -Denforcer.skipRules=requireFilesExist
38
41
@@ -55,10 +58,15 @@ make test-go # = cd native && go clean -testcache && go te
55
58
make build-all # cross-platform natives + Java build
56
59
make update-go-deps # bulk-bump non-indirect Go deps
57
60
make license # apply license-header.txt to .go/.java files
61
+
make check-authors # verify @author tags (ARGS='--fix' suggests additions)
58
62
make release V=1.2.3 VS=1.3.0 # tag release and bump to next snapshot (maintainer only)
63
+
make maven-deploy # mvn -Prelease clean deploy (CI only; needs Central credentials)
59
64
```
60
65
61
-
CI (`.github/workflows/build.yml`): Linux job runs `make test-go` + `make build-all` on Java 8. Matrix jobs run `make build-current-platform` on Windows/macOS with Java 11.
66
+
CI:
67
+
-`.github/workflows/build.yml`: Linux job runs `make test-go` + `make build-all` on Java 8. Matrix jobs run `make build-current-platform` on Windows/macOS with Java 11.
68
+
-`.github/workflows/release.yml` and `snapshots.yml`: Linux Java 8; run `make build-all` then `make maven-deploy`.
69
+
- Shared CI infra: `.github/actions/free-disk-space` (composite action) reclaims runner disk space before Ubuntu builds.
62
70
63
71
**Don't cancel running tests** that hit Kubernetes — they leak cluster resources.
64
72
@@ -91,7 +99,7 @@ Verbs with both forms: `install`, `template`, `show`, `upgrade`. Most others are
91
99
**Java**
92
100
- Source/target 1.8 — no `var`, no `Map.of(...)`, no Optional in APIs, no records.
93
101
- Apache 2.0 header on every `.go` and `.java` file (`make license` enforces).
# The help will print out all targets with their descriptions organized below their categories. The categories are represented by `##@` and the target descriptions by `##`.
36
+
# The awk command is responsible for reading the entire set of makefiles included in this invocation, looking for lines of the file as xyz: ## something, and then pretty-format the target and help. Then, if there's a line with ##@ something, that gets pretty-printed as a category.
37
+
# More info over the usage of ANSI control characters for terminal formatting: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
38
+
# More info over awk command: http://linuxcommand.org/lc3_adv_awk.php
39
+
#
40
+
# Notice that we have a little modification on the awk command to support slash in the recipe name:
0 commit comments