Repository navigation
fix(release): build Windows targets with mingw and add Windows clipboard - #163
Merged
hazcod merged 1 commit intoSep 28, 2026
Merged
Conversation
Release runs have failed since Windows builds were added: pkg/clipboard had no Windows writeAll, and cgo (required by go-sqlcipher) had no Windows cross compiler. Use goreleaser-cross's mingw toolchains so semantic-release can publish again.
wpfleger96
added a commit
to wpfleger96/shell-configs
that referenced
this pull request
Sep 27, 2026
…cess (#186) Two fixes surfaced by an enpass-cli install that failed but still printed `✓ Package installation complete`. **enpass-cli install.** The pinned install ran `gh release download --repo hazcod/enpass-cli --tag v1.12.0`, but `gh release download` takes the tag positionally, so it never succeeded on either platform. Fixing the flag alone isn't enough: v1.12.0 lacks `-exact`, which `load-tf-secrets` uses for the AWS lookups, and upstream hasn't published a release since because its release build fails on the Windows targets. Both platforms now build from upstream commit `cfb4a83`: - `go install ...@<full sha>` with `-X main.version=cfb4a83`, so the `version`/`version_cmd` drift check still works (the binary logs `version=cfb4a83` to stderr, which the check reads). - New prerequisites: Go >= 1.25 and a C compiler (go-sqlcipher needs cgo). The command prechecks `go` with a clear message and sets `CGO_ENABLED=1` so a missing compiler fails the build instead of producing a binary that can't open vaults. Go's install dir is prepended to `PATH` (`/usr/local/go/bin` on Linux, Homebrew bins on macOS) and the temp build dir is cleaned up via `trap`. - `load-tf-secrets`'s "not found" hint now points at `shell-configs install` (which installs Go) rather than `packages install`. Once [enpass-cli#163](hazcod/enpass-cli#163) merges and v1.13.0 is published, this can go back to `gh release download v1.13.0 --repo hazcod/enpass-cli`. **False success reporting.** `install` discarded every `Component.apply()` result, and several `apply()` implementations returned `True` after failures. - Components: `RequiredPackagesComponent`, `OptionalPackagesComponent`, `ConfigsComponent`, and `ExtensionsComponent` return `False` on any failure; `ScriptsComponent` prints the install/orphan-removal errors it used to discard. `ConfigsComponent` counts `OperationResult.ERROR` across configs, additional files, orphan removals, preferences, and state-DB writes, and state-DB results are keyed per database so a VS Code error isn't overwritten by a Cursor success on the same key. - `install`'s body is now `run_install(ctx, components) -> bool`. The command prints `Install completed with errors` and exits 1 on failure; `setup` and `upgrade` call `run_install` directly instead of catching `SystemExit`. A component that raises in any stage is reported and counted as failed while the remaining stages still run, and parallel spinners show `(failed)` when `apply()` returns `False`. - `setup` step 1 now installs only required packages and languages; optional packages (enpass-cli needs Go) are installed in step 3 after languages, so a fresh machine doesn't end in a spurious failure. Script install errors are reported, and setup ends with `Setup completed with errors` + exit 1 when anything failed. Having no package manager still aborts setup. - `upgrade` exits 1 when a version/update check or an upgrade fails, and prints `Upgrade succeeded, but applying configs reported errors` when only the follow-up install failed. - `packages install`/`uninstall` share a `print_batch_summary` helper (`N installed, M failed`) and exit 1 on failure; `configs install` and `cleanup` (partial backup removal) exit 1 too. Behavior change: `install`, and therefore `upgrade`, now exit 1 on machines where gh auth or its required OAuth scopes are missing, including non-interactive runs, since `GhAuthComponent` reports that as a failure. Related: [enpass-cli#163](hazcod/enpass-cli#163)
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.
The release workflow has failed on every push to master since the Windows builds were added in 841ed66, so nothing after v1.12.0 has been published (including #161).
make release-dry-runfails on the Windows targets with two errors:pkg/clipboardhas per-OSwriteAllimplementations but none for Windows, so I addedclipboard_windows.go(same as the darwin one, sinceatotto/clipboardsupports Windows natively). The second error is cgo:go-sqlcipherneeds it and the release runs withCGO_ENABLED=1, but the Windows builds didn't set a cross compiler like the other targets do. I pointed them at the mingw toolchains goreleaser-cross ships (x86_64-w64-mingw32-gccfor amd64,/llvm-mingw/bin/aarch64-w64-mingw32-gccfor arm64).I ran
make release-dry-runlocally with this change and all 7 targets build and archive, includingwindows_amd64andwindows_arm64.