Align CI/CD workflows, fix release defects, and enhance KiCad integration#63
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.