From 796176627359242023c463ff144552d88418e9ac Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Thu, 20 Aug 2026 10:08:59 -0400 Subject: [PATCH 1/2] build: only print `make release` usage on invalid input The target printed 23 lines of usage text before checking VERSION_TYPE, so a valid invocation got the full help dump ahead of the release output. Move the text inside the error branch, leaving only the process header on the success path. Co-Authored-By: Claude Opus 5 (1M context) --- Makefile | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 6ac51f194..3f8937843 100644 --- a/Makefile +++ b/Makefile @@ -457,34 +457,29 @@ test-android-library-e2e: build ## Run instrumented tests for the Gutenberg Andr .PHONY: release release: ## Create and publish a new release - @echo "--- :rocket: Starting GutenbergKit Release Process" - @echo "Usage: make release VERSION_TYPE=[ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] [DRY_RUN=true]" - @echo "" - @echo "Version Types:" - @echo " Custom version number (e.g., 1.2.3)" - @echo " major Increment major version (1.0.0 -> 2.0.0)" - @echo " minor Increment minor version (1.2.0 -> 1.3.0)" - @echo " patch Increment patch version (1.2.3 -> 1.2.4)" - @echo " premajor Increment major version and add prerelease (1.2.3 -> 2.0.0-alpha.0)" - @echo " preminor Increment minor version and add prerelease (1.2.3 -> 1.3.0-alpha.0)" - @echo " prepatch Increment patch version and add prerelease (1.2.3 -> 1.2.4-alpha.0)" - @echo " prerelease Increment prerelease version (1.2.3-alpha.0 -> 1.2.3-alpha.1)" - @echo " from-git Use version from git tag" - @echo "" - @echo "Examples:" - @echo " make release VERSION_TYPE=patch" - @echo " make release VERSION_TYPE=minor" - @echo " make release VERSION_TYPE=major" - @echo " make release VERSION_TYPE=1.2.3" - @echo " make release VERSION_TYPE=premajor" - @echo " make release VERSION_TYPE=prerelease" - @echo " make release VERSION_TYPE=patch DRY_RUN=true" - @echo "" @if [ -z "$(VERSION_TYPE)" ]; then \ echo "Error: VERSION_TYPE is required."; \ - echo "Use one of: , major, minor, patch, premajor, preminor, prepatch, prerelease, from-git"; \ + echo ""; \ + echo "Usage: make release VERSION_TYPE=[ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] [DRY_RUN=true]"; \ + echo ""; \ + echo "Version Types:"; \ + echo " Custom version number (e.g., 1.2.3)"; \ + echo " major Increment major version (1.0.0 -> 2.0.0)"; \ + echo " minor Increment minor version (1.2.0 -> 1.3.0)"; \ + echo " patch Increment patch version (1.2.3 -> 1.2.4)"; \ + echo " premajor Increment major version and add prerelease (1.2.3 -> 2.0.0-alpha.0)"; \ + echo " preminor Increment minor version and add prerelease (1.2.3 -> 1.3.0-alpha.0)"; \ + echo " prepatch Increment patch version and add prerelease (1.2.3 -> 1.2.4-alpha.0)"; \ + echo " prerelease Increment prerelease version (1.2.3-alpha.0 -> 1.2.3-alpha.1)"; \ + echo " from-git Use version from git tag"; \ + echo ""; \ + echo "Examples:"; \ + echo " make release VERSION_TYPE=patch"; \ + echo " make release VERSION_TYPE=1.2.3"; \ + echo " make release VERSION_TYPE=patch DRY_RUN=true"; \ exit 1; \ fi + @echo "--- :rocket: Starting GutenbergKit Release Process" @if [ "$(DRY_RUN)" = "true" ]; then \ ./bin/release.sh $(VERSION_TYPE) --dry-run; \ else \ From 5bd8841c2da65bf6347b7a8ff902bcf4821a89ee Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Thu, 20 Aug 2026 10:13:51 -0400 Subject: [PATCH 2/2] build: align `make help` descriptions to the longest target name The column width was hardcoded at 25 characters, so `build-resources-xcframework` (27) overflowed it and `test-android-library-e2e` (24) left a single space, breaking the alignment of both descriptions. Measure the longest name and pad to it, so adding a longer target keeps the column aligned rather than reintroducing this. Co-Authored-By: Claude Opus 5 (1M context) --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3f8937843..b84271496 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,9 @@ help: ## Display this help menu @echo "" @echo "Available targets:" @grep -E '^[a-zA-Z0-9_-]+:.*?## ' $(MAKEFILE_LIST) | \ - awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-25s\033[0m %s\n", $$1, $$2}' | \ + awk 'BEGIN {FS = ":.*?## "}; \ + { names[NR] = $$1; descs[NR] = $$2; if (length($$1) > width) width = length($$1) } \ + END { for (i = 1; i <= NR; i++) printf " \033[36m%-*s\033[0m %s\n", width, names[i], descs[i] }' | \ sort @echo ""