AmmarAbouZor/tui-journal

Add homebrew installation method

Closed this issue · 4 comments

Would it be possible to add a way to install this via homebrew? Cool project btw!

Hi thanks for the suggestion. I'm glad that you liked this app.

Unfortunately, I don't have any experience for packaging apps to homebrew since I don't use it and don't have enough interest for that. But I would be happy to review PRs that provides this installation method.

tap ownership

@AmmarAbouZor The tap should be owned by the same user who owns the app:

So you'probably have something like: https://github.com/AmmarAbouZor/homebrew-tap

rough sketch of your formula

class Tjournal < Formula
    desc "Your journal app if you live in a terminal"
    homepage "https://crates.io/crates/tui-journal"
  
    on_macos do
      on_arm do
        url "https://github.com/AmmarAbouZor/tui-journal/releases/download/v0.12.0/tjournal-mac.tar.gz"
        sha256 "6cfe22af1a2478f87c366cfb9433746e40c5e443ced94966a34a5221472bddd8"
      end
      on_intel do
        url "https://github.com/GabAlpha/basilk/releases/download/0.2.0/$MAC_OS_INTEL.tar.gz"
        sha256 "$MAC_OS_INTEL_SHASUM"
      end
    end

    on_linux do
      on_intel do
        url "https://github.com/AmmarAbouZor/tui-journal/releases/download/v0.12.0/tjournal-linux-gnu.tar.gz"
        sha256 "15b5a5eb924d7cc2553bd5eec8175975108d806684e4a59354696f73815cf540"
      end
    end
    
    def install
      bin.install "tjournal"
    end
  end

Another thing: is your macOS tarball release Intel or ARM? You'll notice I have foo values in the formula for Intel.

@zachvalenta Thanks for the information. I didn't know that the owner only is the one how supposed to provide the formula.
I'll have a deep dive into this soon.

I think the current release workflow targets MacOS on arm only. I'll need to adjust it as well

@piersolenski @zachvalenta
Homebrew with custom tab is implemented now.
However, I tested it on Linux brew only since I don't have access to MacOS.