| 1 | # winget packaging for CodeWhale |
| 2 | |
| 3 | This directory holds a source winget manifest for `HunterBown.CodeWhale` (resolves #1561). |
| 4 | |
| 5 | > **Not what winget serves today.** The package published in |
| 6 | > [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs/tree/master/manifests/h/HunterBown/CodeWhale) |
| 7 | > (checked 2026-10-04, latest 0.10.0) is a different, multi-file manifest: |
| 8 | > `InstallerType: portable`, one x64 installer |
| 9 | > (`codewhale-tui-windows-x64.exe`), `Commands: codewhale`, and a VC++ 2015+ |
| 10 | > x64 runtime dependency. It has no ARM64 installer and no `codew` alias. |
| 11 | > The singleton below (NSIS + ZIP, x64/arm64, `codewhale` + `codew`) is stale |
| 12 | > at 0.9.6 and has never been what winget installs. Before the next |
| 13 | > submission, base it on the published manifest or update both together, and |
| 14 | > keep the identifier `HunterBown.CodeWhale` (this file used `Hmbown.CodeWhale` |
| 15 | > until 2026-10-04, which would have created a second package). |
| 16 | |
| 17 | The singleton was written so winget installs the single runtime under |
| 18 | `codewhale` + `codew` and never a `codewhale-tui` command. GitHub Releases |
| 19 | retain byte-identical `codewhale-tui-*` filenames only for legacy updater |
| 20 | compatibility. |
| 21 | |
| 22 | ## Files |
| 23 | |
| 24 | - `HunterBown.CodeWhale.yaml` — singleton manifest for `winget install HunterBown.CodeWhale`. The |
| 25 | installers all point at the signed (or checksum-verified) GitHub Release assets for the same |
| 26 | version (`CodeWhaleSetup.exe` for x64 NSIS, plus portable ZIP fallbacks for x64/arm64). |
| 27 | - `generate-winget-manifest.sh` — bumps `PackageVersion`, `ReleaseDate`, and the four |
| 28 | `InstallerSha256` placeholders from a local `release-assets/` checkout. |
| 29 | - `.winget/HunterBown.CodeWhale.yaml` (repo root) is a verbatim mirror for tooling that expects `.winget/`. |
| 30 | Keep both in sync; `packaging/winget/HunterBown.CodeWhale.yaml` is canonical. |
| 31 | |
| 32 | ## Version flow |
| 33 | |
| 34 | 1. Tag `vX.Y.Z` publishes `CodeWhaleSetup.exe`, `codewhale-windows-x64.zip`, |
| 35 | `codewhale-windows-x64-portable.zip`, `codewhale-windows-arm64.zip`, |
| 36 | `codewhale-windows-arm64-portable.zip`, and `codewhale-artifacts-sha256.txt`. |
| 37 | 2. From the release tag checkout, run: |
| 38 | ```bash |
| 39 | ./packaging/winget/generate-winget-manifest.sh X.Y.Z /path/to/release-assets |
| 40 | ``` |
| 41 | It rewrites both `packaging/winget/HunterBown.CodeWhale.yaml` and `.winget/HunterBown.CodeWhale.yaml` |
| 42 | with the fresh version and the four SHA-256 values extracted from `codewhale-artifacts-sha256.txt`. |
| 43 | 3. Validate locally with `winget validate` (requires winget + the manifest schema): |
| 44 | ```bash |
| 45 | winget validate --manifest packaging/winget/HunterBown.CodeWhale.yaml |
| 46 | # or the Microsoft validator in winget-pkgs CI: |
| 47 | # https://github.com/microsoft/winget-pkgs#validation |
| 48 | ``` |
| 49 | 4. Submit to [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs) via |
| 50 | `wingetcreate` or a manual PR that adds `manifests/h/HunterBown/CodeWhale/X.Y.Z/`: |
| 51 | ```bash |
| 52 | wingetcreate update HunterBown.CodeWhale --version X.Y.Z --urls \ |
| 53 | https://github.com/codewhale-hq/CodeWhale/releases/download/vX.Y.Z/CodeWhaleSetup.exe \ |
| 54 | https://github.com/codewhale-hq/CodeWhale/releases/download/vX.Y.Z/codewhale-windows-x64.zip \ |
| 55 | https://github.com/codewhale-hq/CodeWhale/releases/download/vX.Y.Z/codewhale-windows-x64-portable.zip \ |
| 56 | https://github.com/codewhale-hq/CodeWhale/releases/download/vX.Y.Z/codewhale-windows-arm64.zip \ |
| 57 | https://github.com/codewhale-hq/CodeWhale/releases/download/vX.Y.Z/codewhale-windows-arm64-portable.zip |
| 58 | ``` |
| 59 | The generated PR must pass the winget-pkgs validation workflow before merge. |
| 60 | |
| 61 | ## Single-binary note |
| 62 | |
| 63 | Until v0.9.4 the release matrix installed three commands (`codewhale`, `codew`, |
| 64 | and `codewhale-tui`). Since v0.9.5 each target installs only the byte-identical |
| 65 | `codewhale` + `codew` commands (Windows also ships `codewhale.bat`). GitHub |
| 66 | Releases retain `codewhale-tui-*` compatibility filenames for old updater |
| 67 | clients, but the winget ZIP `NestedInstallerFiles` lists only the two current |
| 68 | PATH commands; `codewhale-tui.exe` is intentionally absent. |
| 69 | |
| 70 | ## FreeBSD |
| 71 | |
| 72 | FreeBSD has no prebuilt GitHub Release asset (see `docs/INSTALL.md` § FreeBSD). Install via Cargo: |
| 73 | |
| 74 | ```bash |
| 75 | pkg install -y rust pkgconf # or ports-mgmt/pkg |
| 76 | cargo install codewhale-cli --locked # provides `codewhale` |
| 77 | ``` |
| 78 | |
| 79 | The npm wrapper on FreeBSD exits with `Unsupported platform: freebsd` and points to the Cargo path. |
| 80 | A native `pkg install codewhale` port is tracked as a follow-up to #1097 — contributions welcome |
| 81 | under `packaging/freebsd/`. |
| 82 |