docker-machine-driver-xhyve 0.2.1 (new formula)
Closes Homebrew/homebrew#48002. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
2a04c103ae
commit
e58c70b7f6
1 changed files with 39 additions and 0 deletions
39
Formula/docker-machine-driver-xhyve.rb
Normal file
39
Formula/docker-machine-driver-xhyve.rb
Normal file
|
@ -0,0 +1,39 @@
|
|||
require "language/go"
|
||||
|
||||
class DockerMachineDriverXhyve < Formula
|
||||
desc "Docker Machine driver for xhyve"
|
||||
homepage "https://github.com/zchee/docker-machine-driver-xhyve"
|
||||
url "https://github.com/zchee/docker-machine-driver-xhyve/archive/v0.2.1.tar.gz"
|
||||
sha256 "11ed10c4ea45249e06c9efad0abf1c91b0ec9c4c2a0818ade78f19f41a17794c"
|
||||
|
||||
head "https://github.com/zchee/docker-machine-driver-xhyve.git"
|
||||
|
||||
depends_on :macos => :yosemite
|
||||
depends_on "go" => :build
|
||||
depends_on "docker-machine"
|
||||
|
||||
def install
|
||||
(buildpath/"gopath/src/github.com/zchee/docker-machine-driver-xhyve").install Dir["{*,.git,.gitignore}"]
|
||||
|
||||
ENV["GOPATH"] = "#{buildpath}/gopath"
|
||||
ENV["GO15VENDOREXPERIMENT"] = "1"
|
||||
|
||||
cd buildpath/"gopath/src/github.com/zchee/docker-machine-driver-xhyve" do
|
||||
if build.head?
|
||||
git_hash = `git rev-parse --short HEAD --quiet`.chomp
|
||||
git_hash = " HEAD-#{git_hash}"
|
||||
end
|
||||
system "go", "build", "-o", bin/"docker-machine-driver-xhyve",
|
||||
"-ldflags",
|
||||
"'-w -s'",
|
||||
"-ldflags",
|
||||
"-X 'github.com/zchee/docker-machine-driver-xhyve/xhyve.GitCommit=Homebrew#{git_hash}'",
|
||||
"./main.go"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "xhyve-memory-size",
|
||||
shell_output("#{Formula["docker-machine"].bin}/docker-machine create --driver xhyve -h")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue