Skip to content

refactor: extract output funcs to shared lib#8

Merged
gigatim merged 2 commits intomainfrom
refactor-commonize-output-funcs
Mar 18, 2026
Merged

refactor: extract output funcs to shared lib#8
gigatim merged 2 commits intomainfrom
refactor-commonize-output-funcs

Conversation

@gigatim
Copy link
Contributor

@gigatim gigatim commented Mar 17, 2026

Summary

Standardizes shared infrastructure across the 4 gigalixir buildpack repos (elixir, mix, phoenix-static, releases).

Output functions (lib/output_funcs.sh)

  • Extracts output_section, output_line, output_warning, output_stderr, and output_indent into a shared lib/output_funcs.sh
  • Replaces inline definitions and legacy function names (info, indent, header) with the standardized versions
  • The shared file is identical across all 4 repos

Test framework (test/test_framework.sh)

  • Extracts common test plumbing (cleanup/trap, output stubs, test()/suite()/reset_test() helpers) into a shared test/test_framework.sh
  • Each repo's test/.test_support.sh is now a thin wrapper that sets repo-specific variables and sources the framework
  • The framework file is identical across all 4 repos

Makefile

  • Adds a Makefile with a default test target that runs all executable test files
  • Updates CI workflow to use make test

Test plan

  • All tests pass locally via make test in each repo
  • CI passes on all 4 PRs

gigatim added 2 commits March 17, 2026 11:13
Move output/display helper functions into a
dedicated lib/output_funcs.sh with a standardized
interface (output_section, output_line,
output_warning, output_stderr, output_indent).
@gigatim gigatim merged commit 3262d7f into main Mar 18, 2026
1 check passed
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.

1 participant