chore(build): align Makefile with project conventions#389
Merged
Conversation
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`.
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.
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.
- 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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructure the Makefile to follow the same conventions used in
kubernetes-mcp-server,podman-mcp-server, andcom.marcnuri.automated-tasks.Makefile
make helpwith##@category banners (Build / Test / Code Quality / Development / Release) and per-target##doc strings.cleanto theCLEAN_TARGETS +=pattern so future per-concern modules can contribute their own paths.releaseintobuild/release.mk, auto-included via-include build/*.mk. Additional concerns (CI, packaging) can land here without churning the top-level Makefile.scripts/check-authors.shin as a first-classmake check-authorstarget.ARGS='--fix'forwards flags to the script.build-native-wasi— the WASI experiment is abandoned perCLAUDE.mdand slated for removal.Docs
AGENTS.mdso the layout table, build & test block, and conventions referencemake help, thebuild/*.mkincludes, andmake check-authors.Out of scope
make -n).scripts/check-authors.shis unchanged — wired in, not rewritten. A future change could rewrite it as a Go tool undernative/internal/tools/to retirescripts/.Test plan
make helprenders categorized outputmake -n build-current-platformshows the enforcer-skip mvn invocationmake -n cleanusesCLEAN_TARGETSmake -n check-authorsinvokes./scripts/check-authors.shmake -n release V=1.2.3 VS=1.3.0runs the same git/mvn sequence as before