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