AJ ONeal 8405be04ad
feat(monorel): use YAML anchors to DRY up multi-binary build matrices
When a module has more than one binary, the shared build options (env,
ldflags, goos) are defined once via a YAML anchor on the first build and
merged into the rest with <<: *build_defaults.  Single-binary modules use
plain fields with no anchor overhead.

  - id: gsheet2csv          - id: gsheet2csv
    binary: gsheet2csv        binary: gsheet2csv
    env:              →       <<: &build_defaults
      - CGO_ENABLED=0           env:
    goos:                         - CGO_ENABLED=0
      - aix                     goos:
      - ...                       - aix
  - id: gsheet2env               - ...
    binary: gsheet2env      - id: gsheet2env
    env:                      binary: gsheet2env
      - CGO_ENABLED=0           <<: *build_defaults
    goos: ...

The commented-out ios stubs follow the same pattern using a separate
build_defaults_ios anchor so they remain consistent when uncommented.

Also extracts defaultGoos to a package-level var to avoid repetition.
2026-03-01 19:13:50 -07:00
..