Skip to content

Align CI/CD workflows, fix release defects, and enhance KiCad integration#63

Merged
cbrake merged 6 commits into
mainfrom
cbrake/main
Jul 14, 2026
Merged

Align CI/CD workflows, fix release defects, and enhance KiCad integration#63
cbrake merged 6 commits into
mainfrom
cbrake/main

Conversation

@cbrake

@cbrake cbrake commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

cbrake added 6 commits July 14, 2026 16:17
Restructure the workflows to match the layout used in yoe: a single CI
workflow covering tests, a version-stamped build, gofmt/vet, and the
Markdown format check, plus a release workflow pinned to GoReleaser v2.
The Go version now comes from go.mod rather than a hardcoded value that
had drifted, and the Markdown check runs on pushes to main as well as
pull requests.

Fix two defects in the release path along the way:

- `gitplm update` was broken on Windows. The published assets carry a
  .exe suffix that getBinaryName never added, so the download 404'd. The
  naming logic is now a pure function pinned by TestBinaryName against
  the assets actually published, since the archives name_template in
  .goreleaser.yml and update.go have to agree.

- Releases could ship with empty notes, and v0.8.10 did. The changelog
  extractor silently emitted nothing when a version had no section; it
  now fails instead. scripts/prepare-release.sh removes the manual step
  that caused this by promoting [Unreleased] to a dated section, running
  the tests, committing, and tagging. It does not push.

Restore the 0.8.10 through 0.8.12 changelog sections, which existed at
their tags but had been dropped from main, and correct the typo in the
0.8.12 release link.

Rewrite envsetup.sh to mirror what CI does, replacing GoReleaser flags
removed in v2 and a stale -bom flag that no longer exists.
Serving a part to KiCad left every CSV column visible on the schematic, so
placing a symbol surrounded it with its IPN, MPN, datasheet URL, and every
parametric value. KiCad displays a field whose visibility is unspecified, and
the HTTP library API never set it.

Fields are now served hidden, and an http.fields section in gitplm.yml states
the exceptions for each IPN category: the column that populates KiCad's built-in
Value field, the columns KiCad displays, and any column served under a different
field name. A category's settings are applied on top of a default section shared
by all categories, so a category only carries what it changes. These settings say
the same thing as the field definitions in a KiCad database library (.kicad_dbl),
which makes the two configurations easy to keep in step.

The server also watches the partmaster directory and reloads the CSV files when
one of them changes, printing a message to the console, so edits reach KiCad
without a restart. The whole directory is reloaded rather than the file that
changed, since editors and Git write through temporary files and renames. A
reload that fails leaves the previously loaded data in place. The CSV collection
is guarded by a mutex and replaced wholesale, so requests in flight keep reading
the collection they started with.
The Markdown format check installed the latest prettier on every run, while
contributors ran whatever version they happened to have. Prettier 3.9 added a
rule requiring a blank line before the closing TOC marker, so CI began failing
README.md on a section no one had touched, and `gitplm_check` still passed
locally against 3.8.

The version now lives in .prettier-version. CI installs that version, and the
envsetup helpers run it through npx, so a local check reaches the same verdict
as CI and a new prettier release cannot fail a build on its own. README.md is
reformatted with the pinned version.
@cbrake cbrake merged commit c8f63f3 into main Jul 14, 2026
4 checks 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