Skip to content

docs: format and document the jq filter in get-build-targets.sh - #337

Merged
chorrell merged 1 commit into
mainfrom
docs/document-jq-filter
Sep 30, 2026
Merged

chorrell merged 1 commit into
mainfrom
docs/document-jq-filter

Conversation

@chorrell

Copy link
Copy Markdown
Owner

Summary

  • Move the jq program in get-build-targets.sh into a quoted heredoc (TARGETS_FILTER), so comments can contain any characters and the SC2016 shellcheck suppression is no longer needed
  • Document the input/output shape and the jq variables passed in from the shell
  • Break the filter into labelled steps (normalize, name reference releases, compute tags, pick targets, shape output) with inline comments on each tag rule
  • Add a small semver helper for the duplicated version sort key
  • Put each jq flag on its own line

No behavior change.

Test plan

  • ./get-build-targets.sh -a and ./get-build-targets.sh -n 22.12.0 output is identical before and after
  • bats test/get-build-targets.bats: all 20 tests pass
  • shellcheck and shfmt pass (pre-commit hooks)

🤖 Generated with Claude Code

Move the jq program into a quoted heredoc (TARGETS_FILTER) and annotate
each step: normalizing the release index, naming the reference releases,
computing tags, picking targets, and shaping the output. Document the
input/output shape and the jq variables passed in from the shell.

Add a small semver helper for the duplicated version sort key. Output is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chorrell
chorrell merged commit f87e839 into main Sep 30, 2026
11 checks passed
@chorrell
chorrell deleted the docs/document-jq-filter branch September 30, 2026 02:07
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