/
docker2aci.rb
29 lines (25 loc) 路 1.07 KB
/
docker2aci.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
class Docker2aci < Formula
desc "Library and CLI tool to convert Docker images to ACIs"
homepage "https://github.com/appc/docker2aci"
url "https://github.com/appc/docker2aci/archive/v0.17.2.tar.gz"
sha256 "43cb18a3647ca8bae48a283fa3359e9555ab7a366c7ee9ef8a561797cebe2593"
bottle do
cellar :any_skip_relocation
sha256 "d290f70a22e626cbb77bae170833cc85722d8117caac9cd06b615d9fa7e7082c" => :high_sierra
sha256 "592a831c0425d69dc6dcda04c326cc3cc6c92c198f6b04787877c0d784ee6e55" => :sierra
sha256 "6dce9bc1299cafa3b9bdd090b33145421b2fe3dfed9bb9bfc4fad75363cfd1b2" => :el_capitan
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/appc").mkpath
ln_s buildpath, buildpath/"src/github.com/appc/docker2aci"
system "go", "build", "-o", bin/"docker2aci", "-ldflags",
"-X github.com/appc/docker2aci/lib.Version=#{version}",
"github.com/appc/docker2aci"
end
test do
assert_match version.to_s, shell_output("#{bin}/docker2aci -version")
system "#{bin}/docker2aci", "docker://busybox"
end
end