-
Notifications
You must be signed in to change notification settings - Fork 8
/
apko.rb
47 lines (40 loc) · 1.38 KB
/
apko.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class Apko < Formula
desc "Build and publish OCI container images built from apk packages"
homepage "https://github.com/chainguard-dev/apko"
version "0.9.0"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/chainguard-dev/apko/releases/download/v#{version}/apko_#{version}_darwin_arm64.tar.gz"
sha256 "8ff96409de2a1f2eba4a5c4dda96c6005d66a345cb26e78862a7320d5a415c89"
def install
bin.install "apko"
end
end
if Hardware::CPU.intel?
url "https://github.com/chainguard-dev/apko/releases/download/v#{version}/apko_#{version}_darwin_amd64.tar.gz"
sha256 "1386f8ad7e0b7da04882db0f6cd4dd2e3ffd820c646859c11af2a465c657c8d7"
def install
bin.install "apko"
end
end
end
on_linux do
if Hardware::CPU.arm?
url "https://github.com/chainguard-dev/apko/releases/download/v#{version}/apko_#{version}_linux_arm64.tar.gz"
sha256 "8978df010b307092f9ec683deb983753040d1880e19cc62e16adbfe3b630c651"
def install
bin.install "apko"
end
end
if Hardware::CPU.intel?
url "https://github.com/chainguard-dev/apko/releases/download/v#{version}/apko_#{version}_linux_amd64.tar.gz"
sha256 "fcccc3607a2ec61050669fdc77d9ee1265a922b8a4f1b38166777efec9861d16"
def install
bin.install "apko"
end
end
end
test do
system "#{bin}/apko", "version"
end
end