Skip to content

Commit 0e9b202

Browse files
authored
Merge pull request Homebrew#260701 from Aciid/umoci-0.6.0
umoci 0.6.0 (new formula)
2 parents 68ba2e1 + 5a8687a commit 0e9b202

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Formula/u/umoci.rb

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
class Umoci < Formula
2+
desc "Reference OCI implementation for creating, modifying and inspecting images"
3+
homepage "https://github.com/opencontainers/umoci"
4+
url "https://github.com/opencontainers/umoci/archive/refs/tags/v0.6.0.tar.gz"
5+
sha256 "400a26c5f7ac06e40af907255e0e23407237d950e78e8d7c9043a1ad46da9ae5"
6+
license "Apache-2.0"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, arm64_tahoe: "829bbd94a1b9c3964d348579e9a28529a4ead9ced1b404c4d4f622605ea62fb6"
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "829bbd94a1b9c3964d348579e9a28529a4ead9ced1b404c4d4f622605ea62fb6"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "829bbd94a1b9c3964d348579e9a28529a4ead9ced1b404c4d4f622605ea62fb6"
12+
sha256 cellar: :any_skip_relocation, sonoma: "72fe058ae9412ed0ce970924c427e99d277fca22c78d04da4b01902b62c3cce6"
13+
sha256 cellar: :any_skip_relocation, arm64_linux: "3377df8adcffb0ae679c980d628d88b6e48b72993777edff8c3910808c7d96df"
14+
sha256 cellar: :any_skip_relocation, x86_64_linux: "8fcda2e6f0a1069ccc89935c14ab9e168f9b183fe99ede1878d444bb8c44db0c"
15+
end
16+
17+
depends_on "go" => :build
18+
depends_on "go-md2man" => :build
19+
depends_on "gpgme"
20+
21+
def install
22+
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/umoci"
23+
24+
man1.mkpath
25+
buildpath.glob("doc/man/*.md").each do |f|
26+
system "go-md2man", "-in", f, "-out", man1/f.basename(".md")
27+
end
28+
end
29+
30+
test do
31+
assert_match version.to_s, shell_output("#{bin}/umoci --version")
32+
33+
error_message = "invalid image detected"
34+
assert_match error_message, shell_output("#{bin}/umoci stat --image fake 2>&1", 1)
35+
assert_match error_message, shell_output("#{bin}/umoci list --layout fake 2>&1", 1)
36+
end
37+
end

0 commit comments

Comments
 (0)