Skip to content

armgit / kanzo

Public Imported from GitHub
0

Self-hosted, sharable kanban for humans and agents. One 4.7 MB binary, 5 MB of RAM, 10 to 60 tokens per agent reply, starts in 3 ms, zero setup.

Drop the Homebrew tap

emanuele-em2d809b2727e8
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1c45ca2..537eba8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -278,61 +278,14 @@ jobs:
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
- publish-homebrew-formula:
- needs:
- - plan
- - host
- runs-on: "ubuntu-22.04"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- PLAN: ${{ needs.plan.outputs.val }}
- GITHUB_USER: "axo bot"
- GITHUB_EMAIL: "[email protected]"
- if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
- steps:
- - uses: actions/checkout@v6
- with:
- persist-credentials: true
- repository: "emanuele-em/homebrew-tap"
- token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
- # So we have access to the formula
- - name: Fetch homebrew formulae
- uses: actions/download-artifact@v8
- with:
- pattern: artifacts-*
- path: Formula/
- merge-multiple: true
- # This is extra complex because you can make your Formula name not match your app name
- # so we need to find releases with a *.rb file, and publish with that filename.
- - name: Commit formula files
- run: |
- git config --global user.name "${GITHUB_USER}"
- git config --global user.email "${GITHUB_EMAIL}"
-
- for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith(".rb")] | any)'); do
- filename=$(echo "$release" | jq '.artifacts[] | select(endswith(".rb"))' --raw-output)
- name=$(echo "$filename" | sed "s/\.rb$//")
- version=$(echo "$release" | jq .app_version --raw-output)
-
- export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
- brew update
- # We avoid reformatting user-provided data such as the app description and homepage.
- brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true
-
- git add "Formula/${filename}"
- git commit -m "${name} ${version}"
- done
- git push
-
announce:
needs:
- plan
- host
- - publish-homebrew-formula
# use "always() && ..." to allow us to wait for all publish jobs while
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
- if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') }}
+ if: ${{ always() && needs.host.result == 'success' }}
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/dist-workspace.toml b/dist-workspace.toml
index c0e0817..cb60015 100644
--- a/dist-workspace.toml
+++ b/dist-workspace.toml
@@ -8,7 +8,7 @@ cargo-dist-version = "0.33.1"
# CI backends to support
ci = "github"
# The installers to generate for each app
-installers = ["shell", "homebrew"]
+installers = ["shell"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
# Path that installers should place binaries in
@@ -17,7 +17,3 @@ install-path = "CARGO_HOME"
hosting = "github"
# Whether to install an updater program
install-updater = false
-# A GitHub repo to push Homebrew formulas to
-tap = "emanuele-em/homebrew-tap"
-# Publish jobs to run in CI
-publish-jobs = ["homebrew"]
diff --git a/src/service.rs b/src/service.rs
index cfe16e0..1da30d3 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -63,12 +63,6 @@ pub fn install(home: &Home) -> Result<()> {
bail!("kanzo service only supports macOS; start `kanzo --no-open` with your own init system");
}
let exe = std::env::current_exe().context("cannot find the kanzo program")?;
- // Prefer the stable Homebrew link over the versioned Cellar path it points to.
- let exe = ["/opt/homebrew/bin/kanzo", "/usr/local/bin/kanzo"]
- .iter()
- .map(PathBuf::from)
- .find(|p| p.canonicalize().ok() == exe.canonicalize().ok())
- .unwrap_or(exe);
let log = dirs::home_dir().context("cannot find your home folder")?.join("Library/Logs/kanzo.log");
let plist = plist(&exe, &home.dir, &log);
@@ -111,8 +105,7 @@ mod tests {
fn plist_is_valid() {
let tmp = tempfile::tempdir().unwrap();
let file = tmp.path().join("agent.plist");
- let text =
- plist(Path::new("/opt/homebrew/bin/kanzo"), Path::new("/Users/a & b/kanzo"), Path::new("/tmp/k.log"));
+ let text = plist(Path::new("/usr/local/bin/kanzo"), Path::new("/Users/a & b/kanzo"), Path::new("/tmp/k.log"));
std::fs::write(&file, &text).unwrap();
let lint = Command::new("plutil").arg("-lint").arg(&file).output().unwrap();
assert!(lint.status.success(), "{}", String::from_utf8_lossy(&lint.stdout));