diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a87334d..6718561 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -43,6 +43,8 @@ lightweight validation in `make release-check`. - Added an Arch `.SRCINFO` draft and AUR maintainer notes, with version/package checks in `make release-check`. +- Added Homebrew tap maintainer notes, and expanded `make release-check` to + validate the formula class and `libssh` dependency. ## 2026-05-18 - Interactive input polish diff --git a/packaging/README.md b/packaging/README.md index a474b2a..2174f39 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -7,7 +7,7 @@ any public registry. ## Current targets - `arch/` - AUR-ready draft for `tnt-chat`. -- `homebrew/tnt-chat.rb` - Homebrew tap formula draft. +- `homebrew/` - Homebrew tap formula draft and maintainer notes. - `debian/` - Ubuntu PPA / Debian packaging notes and draft metadata. ## Release checklist diff --git a/packaging/homebrew/README.md b/packaging/homebrew/README.md new file mode 100644 index 0000000..8679bd9 --- /dev/null +++ b/packaging/homebrew/README.md @@ -0,0 +1,49 @@ +# Homebrew Packaging + +The draft formula is `tnt-chat.rb`. The expected install path for users is a +project tap first, not Homebrew core: + +```sh +brew tap m1ngsama/tnt +brew install tnt-chat +``` + +Homebrew core should wait until TNT has stable releases and broader usage. + +## Local validation + +From a tap repository: + +```sh +brew audit --strict --online tnt-chat +brew install --build-from-source ./Formula/tnt-chat.rb +brew test tnt-chat +``` + +For local syntax-only validation from this repository: + +```sh +ruby -c packaging/homebrew/tnt-chat.rb +``` + +## Updating the formula + +1. Publish a GitHub release tag such as `v1.0.0`. +2. Download or hash the release source archive: + + ```sh + curl -L -o tnt-chat-1.0.0.tar.gz \ + https://github.com/m1ngsama/TNT/archive/refs/tags/v1.0.0.tar.gz + shasum -a 256 tnt-chat-1.0.0.tar.gz + ``` + +3. Replace `REPLACE_WITH_RELEASE_TARBALL_SHA256` in `tnt-chat.rb`. +4. Run: + + ```sh + make release-check-strict + ``` + +5. Copy the formula into the tap repository and open a normal review PR. + +Do not connect this tap update to production deployment. diff --git a/scripts/release_check.sh b/scripts/release_check.sh index e80d9b0..a5ca527 100755 --- a/scripts/release_check.sh +++ b/scripts/release_check.sh @@ -72,6 +72,10 @@ grep -q "^pkgname = tnt-chat$" packaging/arch/.SRCINFO || fail "packaging/arch/.SRCINFO pkgname is not tnt-chat" grep -q "v${version}.tar.gz" packaging/homebrew/tnt-chat.rb || fail "packaging/homebrew/tnt-chat.rb URL does not match v$version" +grep -q "^class TntChat < Formula$" packaging/homebrew/tnt-chat.rb || + fail "packaging/homebrew/tnt-chat.rb formula class is not TntChat" +grep -q 'depends_on "libssh"' packaging/homebrew/tnt-chat.rb || + fail "packaging/homebrew/tnt-chat.rb must depend on libssh" grep -q "^tnt-chat (${version}-1)" packaging/debian/debian/changelog || fail "packaging/debian/debian/changelog version does not match $version" grep -q "^Source: tnt-chat$" packaging/debian/debian/control ||