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

logalize 0.4.1 (new formula) #197757

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
39 changes: 39 additions & 0 deletions Formula/l/logalize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class Logalize < Formula
desc "Fast and extensible log colorizer. Alternative to ccze"
homepage "https://github.com/deponian/logalize"
url "https://github.com/deponian/logalize.git",
tag: "v0.4.1",
revision: "2d74f36f36037d1a09371f044a85b2b8f192905f"
Comment on lines +4 to +6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url "https://github.com/deponian/logalize.git",
tag: "v0.4.1",
revision: "2d74f36f36037d1a09371f044a85b2b8f192905f"
url "https://github.com/deponian/logalize/archive/refs/tags/v0.4.1.tar.gz"
sha256 "xxx"

license "MIT"
head "https://github.com/deponian/logalize.git", branch: "main"

depends_on "go" => :build

def install
system "make", "VERSION=#{version}", "build"
bin.install "dist/#{version}/logalize"

system "make", "VERSION=#{version}", "manpage"
man1.install "manpages/logalize.1.gz"

system "make", "completions"
bash_completion.install "completions/logalize.bash" => "logalize"
zsh_completion.install "completions/logalize.zsh" => "_logalize"
fish_completion.install "completions/logalize.fish"
Comment on lines +13 to +22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
system "make", "VERSION=#{version}", "build"
bin.install "dist/#{version}/logalize"
system "make", "VERSION=#{version}", "manpage"
man1.install "manpages/logalize.1.gz"
system "make", "completions"
bash_completion.install "completions/logalize.bash" => "logalize"
zsh_completion.install "completions/logalize.zsh" => "_logalize"
fish_completion.install "completions/logalize.fish"
ldflags = "xxx"
system "go", "build", *std_go_args(ldflags:), "./cmd"
generate_completions_from_executable(bin/"logalize", "completion")

end

test do
(testpath/".logalize.yaml").write <<~EOF
words:
good:
- hello
themes:
test:
words:
good:
fg: "#00ff00"
style: bold
EOF
assert_match "\e[;1mhello\e[0m\n", pipe_output("#{bin}/logalize -t test", "hello")
end
end
Loading