Skip to content

Commit

Permalink
codesnap 0.8.3 (new formula)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Linnane <patrick@linnane.io>

codesnap: skip linux ci test

Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
p-linnane authored and chenrui333 committed Jan 7, 2025
1 parent 409b114 commit 76e468d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ code-server
codec2
codelimit
coder
codesnap
codespell
codevis
cog
Expand Down
25 changes: 25 additions & 0 deletions Formula/c/codesnap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class Codesnap < Formula
desc "Generates code snapshots in various formats"
homepage "https://github.com/mistricky/CodeSnap"
url "https://github.com/mistricky/CodeSnap/archive/refs/tags/v0.8.3.tar.gz"
sha256 "acb3e160039c9986f4566f3504df2c820558e62b7a412d4fd5030008f2c44f81"
license "MIT"
head "https://github.com/mistricky/CodeSnap.git", branch: "main"

depends_on "rust" => :build

def install
system "cargo", "install", *std_cargo_args(path: "cli")

pkgshare.install "examples"
end

test do
assert_match version.to_s, shell_output("#{bin}/codesnap --version")

# Fails in Linux CI with "no default font found"
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]

assert_match "SUCCESS", shell_output("#{bin}/codesnap -f #{pkgshare}/examples/cli.sh -o cli.png")
end
end

0 comments on commit 76e468d

Please sign in to comment.