Skip to content

Commit 14a1ae4

Browse files
authored
Merge pull request #203491 from Homebrew/codesnap-add-formula
codesnap 0.8.3 (new formula)
2 parents 6cabe53 + 70f4092 commit 14a1ae4

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/autobump.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ code-server
541541
codec2
542542
codelimit
543543
coder
544+
codesnap
544545
codespell
545546
codevis
546547
cog

Formula/c/codesnap.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class Codesnap < Formula
2+
desc "Generates code snapshots in various formats"
3+
homepage "https://github.com/mistricky/CodeSnap"
4+
url "https://github.com/mistricky/CodeSnap/archive/refs/tags/v0.8.3.tar.gz"
5+
sha256 "acb3e160039c9986f4566f3504df2c820558e62b7a412d4fd5030008f2c44f81"
6+
license "MIT"
7+
head "https://github.com/mistricky/CodeSnap.git", branch: "main"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "87e46adb2b04171b28b5dfc78ae05f78f148044de5dce1467d511153247d8cee"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "b33ed994518151e27221f8210aa7890f108e107d56956d362dd18626ab8689c4"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "cc2e8dbe3ee5187e3fe56ce60b6a5160bbcb7764079e46cf1643aa7206471215"
13+
sha256 cellar: :any_skip_relocation, sonoma: "0137a524ad3dcaeb41279a7d8116dde25740eccf78a54b7bc71e42ef31f01c51"
14+
sha256 cellar: :any_skip_relocation, ventura: "12e63b80ef9724e9cde857eea9a2d671a3540ee4339d6881e94afe5b5dcbf12a"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "14f94426bba298fd9f0e9cce02ee56c3cf5a271182328cb73f68403d6c93588b"
16+
end
17+
18+
depends_on "rust" => :build
19+
20+
def install
21+
system "cargo", "install", *std_cargo_args(path: "cli")
22+
23+
pkgshare.install "examples"
24+
end
25+
26+
test do
27+
assert_match version.to_s, shell_output("#{bin}/codesnap --version")
28+
29+
# Fails in Linux CI with "no default font found"
30+
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]
31+
32+
assert_match "SUCCESS", shell_output("#{bin}/codesnap -f #{pkgshare}/examples/cli.sh -o cli.png")
33+
end
34+
end

0 commit comments

Comments
 (0)