Skip to content

feat: add build hygiene - make build, check targets, CI and pre-push hook#351

Merged
mbailey merged 2 commits into
masterfrom
feat/BMA-4-build-hygiene
Nov 26, 2025
Merged

feat: add build hygiene - make build, check targets, CI and pre-push hook#351
mbailey merged 2 commits into
masterfrom
feat/BMA-4-build-hygiene

Conversation

@ai-cora
Copy link
Copy Markdown
Collaborator

@ai-cora ai-cora commented Nov 26, 2025

Summary

  • Add make build target to run scripts/build (generates aliases, functions, bash_completion.sh)
  • Add make check target to verify generated files are up to date
  • Add make clean to restore generated files to git HEAD
  • Add make install-hooks to set up pre-push git hook
  • Add pre-push git hook (scripts/hooks/pre-push) that blocks push if generated files are stale
  • Add GitHub workflow (.github/workflows/build-check.yml) to run make check on push/PR to master
  • Regenerate all files (includes CloudWatch functions that were missing)

Background

When functions are added to lib/*-functions, scripts/build must be run to regenerate the generated files. This wasn't discoverable - the Makefile only had test targets.

The CloudWatch functions (cloudwatch-alarms, cloudwatch-alarm-delete, etc.) were added but the build was never run, so they weren't available when using the alias approach.

Test plan

  • Verify make build runs successfully
  • Verify make check passes when files are up to date
  • Verify make check fails when files are stale (modify a function file, don't run build)
  • Verify make install-hooks creates the pre-push hook
  • Verify GitHub Actions workflow runs on this PR

🤖 Generated with Claude Code

…hook

When functions are added to lib/*-functions, scripts/build must be run
to regenerate the aliases, functions, and bash_completion.sh files.
This was not discoverable - Makefile only had test targets.

Changes:
- Add `make build` target to run scripts/build
- Add `make check` target to verify generated files are up to date
- Add `make clean` to restore generated files to git HEAD
- Add `make install-hooks` to set up pre-push hook
- Add pre-push git hook (scripts/hooks/pre-push) that runs make check
- Add GitHub workflow (.github/workflows/build-check.yml) for CI
- Regenerate aliases/functions/completions (includes CloudWatch functions)

The CloudWatch functions (cloudwatch-alarms, etc.) were missing from
the generated files - this commit includes them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ai-cora ai-cora requested a review from mbailey as a code owner November 26, 2025 05:07
@ai-cora ai-cora requested a review from mbailey November 26, 2025 05:07
- `make build` now runs quietly and shows a summary:
  - Function count
  - Alias count
  - Changed files (if any)
- `make build-verbose` shows full output including docs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mbailey mbailey merged commit 775ff93 into master Nov 26, 2025
1 check passed
Copy link
Copy Markdown
Owner

@mbailey mbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@mbailey mbailey deleted the feat/BMA-4-build-hygiene branch November 26, 2025 05:19
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.

2 participants