Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zk v0.9.0 (new formula) #91670

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Formula/zk.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class Zk < Formula
desc "Plain text note-taking assistant"
homepage "https://github.com/mickael-menu/zk"
url "https://github.com/mickael-menu/zk/archive/refs/tags/v0.9.0.tar.gz"
sha256 "102754f2722e7e4ff0a83715085c8bfdac090b440f89020123481a95b566730f"
license "GPL-3.0-only"

head "https://github.com/mickael-menu/zk.git", branch: "main"

depends_on "go" => :build

depends_on "icu4c"
uses_from_macos "sqlite"

def install
system "go", "build", *std_go_args, "-tags", "fts5,icu", "-ldflags", "-X=main.Version=#{version} -X=main.Build=brew"
mhanberg marked this conversation as resolved.
Show resolved Hide resolved
end

test do
system "#{bin}/zk", "init", "--no-input"
system "#{bin}/zk", "index", "--no-input"
(testpath/"testnote.md").write "note content"
(testpath/"anothernote.md").write "todolist"

output = pipe_output("#{bin}/zk list --quiet").chomp
assert_match "note content", output
assert_match "todolist", output
end
end