Skip to content

Commit 5b83dd7

Browse files
committed
homebrew recipe to install govc from https://github.com/vmware/govmomi
1 parent 8556c15 commit 5b83dd7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

govc.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require "FileUtils"
2+
3+
class Govc < Formula
4+
homepage "https://github.com/vmware/govmomi"
5+
6+
v = "v0.18.0" # CI Managed
7+
url "https://github.com/vmware/govmomi/releases/download/#{v}/govc_darwin_amd64.gz"
8+
version v
9+
sha256 "58d522f32e79c509f4b42edb7d0e80ef0bade5592520df06b93c8f91731e780a" # CI Managed
10+
11+
def gunzip(filename)
12+
command = "gunzip --force #{filename}"
13+
success = system(command)
14+
15+
success && $?.exitstatus == 0
16+
end
17+
18+
def install
19+
FileUtils.mv("govc_darwin_amd64", "govc")
20+
bin.install "govc"
21+
end
22+
23+
test do
24+
system "#{bin}/govc", "version"
25+
end
26+
end
27+

0 commit comments

Comments
 (0)